emacs-devel
[Top][All Lists]
Advanced

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

Re: Byte compiler and eval-when-compile


From: Glenn Morris
Subject: Re: Byte compiler and eval-when-compile
Date: Thu, 18 Oct 2012 15:53:02 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

David Engster wrote:

> Could you maybe take a look at the end of eieio.el? I don't understand
> why the compiler warns that `eieio-update-lisp-imenu-expression' is
> undefined (he actually always did that, not only since your last
> change). I'm also not sure what's the fix here - why did you wrap the
> check for (boundp 'lisp-imenu-generic-expression) in an
> `eval-when-compile'?

The byte-compiler is not that smart and doesn't fully recognize defuns
that are not at top-level. This one is "hidden" inside an if.
You could eval-and-compile the whole thing (defun and all) to make the
warning go away. But lisp-imenu-generic-expression is defined in every
Emacs since at least 21.1, so I don't see the point of the if, unless
it's an XEmacs thing, in which case featurep 'xemacs can be cleaner.



reply via email to

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