[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: address@hidden: RE: weird defadvice bug withbyte-compilation]
From: |
Drew Adams |
Subject: |
RE: address@hidden: RE: weird defadvice bug withbyte-compilation] |
Date: |
Sun, 11 Dec 2005 10:17:39 -0800 |
Debugger entered--Lisp error: (void-variable my-mode)
I think I see the reason for this error:
(let ((map (make-sparse-keymap "II")))
(setq mymap (make-sparse-keymap))
(define-key menu-bar-search-menu [ise] '("" . ise))
(put 'ise 'menu-enable '(and my-mode))
The menu command's enable condition tests a void variable.
So this error seems to be correct.
See my previous message - I already indicated that the menu-enable is
testing a void variable. The question is why it is void.
There are a couple of questions involved (see my email), including how
define-minor-mode works. My understanding was that define-minor-mode was
designed to replace an explicit defcustom or defvar for the mode variable
(my-mode), in addition to replacing an explicit definition of the minor-mode
toggle function. If that is the intention, then this case seems to point to
a hole in the implementation (?) - users of define-minor-mode must
nevertheless be concerned with also defining the mode variable, if they
explicitly use it in a menu-enable property.
And, again, there seem to be other things going on in this case, as well:
If I remove any part of the code I submitted with the bug, the
bug goes away. This suggests that it involves: 1) the mode-line
indication (minor-mode-map-alist), 2) the menu-enable condition
(that's the code that provokes the error message by evaluating
the unbound variable), 3) the keymap, 4) the defadvice in foo.el,
and 5) the defadvice in bar.el.
- address@hidden: RE: weird defadvice bug with byte-compilation], Richard Stallman, 2005/12/04
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Chong Yidong, 2005/12/07
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/07
- RE: address@hidden: RE: weird defadvice bug with byte-compilation], Drew Adams, 2005/12/08
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/09
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Chong Yidong, 2005/12/09
- RE: address@hidden: RE: weird defadvice bug withbyte-compilation], Drew Adams, 2005/12/09
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/09
- RE: address@hidden: RE: weird defadvice bug withbyte-compilation],
Drew Adams <=
- Re: address@hidden: RE: weird defadvice bug withbyte-compilation], Richard M. Stallman, 2005/12/12
- RE: address@hidden: RE: weird defadvice bugwithbyte-compilation], Drew Adams, 2005/12/12
- Re: address@hidden: RE: weird defadvice bugwithbyte-compilation], Richard M. Stallman, 2005/12/12
- RE: address@hidden: RE: weird defadvicebugwithbyte-compilation], Drew Adams, 2005/12/12
- Re: address@hidden: RE: weird defadvicebugwithbyte-compilation], Richard M. Stallman, 2005/12/13
- RE: address@hidden: RE: weirddefadvicebugwithbyte-compilation], Drew Adams, 2005/12/13
- Re: address@hidden: RE: weirddefadvicebugwithbyte-compilation], Johan Bockgård, 2005/12/13
- RE: address@hidden: RE:weirddefadvicebugwithbyte-compilation], Drew Adams, 2005/12/13
- RE: address@hidden:RE:weirddefadvicebugwithbyte-compilation], Drew Adams, 2005/12/13
- Re: address@hidden: RE:weirddefadvicebugwithbyte-compilation], Johan Bockgård, 2005/12/14