emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Byte-compiler warnings for todo-mode.el


From: Stephen Berman
Subject: Re: Byte-compiler warnings for todo-mode.el
Date: Mon, 06 Aug 2018 18:30:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Mon, 06 Aug 2018 11:32:28 -0400 Stefan Monnier <address@hidden> wrote:

>> ...starting emacs -Q with the above code and my ~/.emacs.d/todo/
>> directory, typing `F f' in todo-mode prompts for a filtered items file
>> and repeating M-n brings up all and only the names of my filtered items
>> files in the minibuffer, i.e., all and only the elements of sfnlist.
>
> No, M-n gives you the elements of falist.  Try M-p

(M-n actually shows the cars of the elements of falist.)  I see now that
I was unaware that M-n shows the list of default values if the history
is empty (the doc string doesn't say this but the Emacs manual does), so
I was laboring under a mistaken understanding.  Thanks for making me see
the light.

> BTW, what this also means is that you shouldn't pre-populate sfnlist
> with the elements of falist.  Instead, call it todo--something-history,
> make it a global variable, and don't touch it yourself at all.

Yes, this works well, thanks.

>>>> The warning can be prevented with (eval-and-compile (require 'hl-line)).
>>> This ideally shouldn't remove the warning (i.e. if it does, as you say,
>>> then it's probably the result of a bug or misfeature in the compiler).
>> When I replace the above if-sexp with this:
>>   (when (and (eval-and-compile (require 'hl-line)) hl-line-mode)
>>     (hl-line-highlight))
>> and byte-compile the file in emacs -Q, Emacs does not produce the
>> warning.  Should I make a bug report?
>
> Sorry, I thought you had written eval-when-compile.
> With eval-and-compile it's normal and correct that the warning disappears.

Ah, ok.

Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]