all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Byte compiler and eval-when-compile
Date: Thu, 18 Oct 2012 15:53:02 -0400	[thread overview]
Message-ID: <gha9vjh80x.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <876267zk1u.fsf@engster.org> (David Engster's message of "Thu, 18 Oct 2012 20:55:57 +0200")

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	other threads:[~2012-10-18 19:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 16:23 Byte compiler and eval-when-compile David Engster
2012-10-15 18:41 ` Stefan Monnier
2012-10-15 19:26   ` David Engster
2012-10-16  0:58     ` Stefan Monnier
2012-10-18 18:55       ` David Engster
2012-10-18 19:53         ` Glenn Morris [this message]
2012-10-18 20:07           ` David Engster
2012-10-18 20:11           ` Glenn Morris
2012-10-18 20:15             ` David Engster
2012-10-19  0:38         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gha9vjh80x.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.