[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Menu filter triggered too early
From: |
Ralf Angeli |
Subject: |
Menu filter triggered too early |
Date: |
Sat, 07 May 2005 16:00:45 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
While fiddling with the menu filters in AUCTeX I ran into a problem
with the filter functions being called too early, i.e. during the
execution of `easy-menu-define'. This happens only if
`easy-menu-define' is called in a load file. You can use the
following call for testing:
(easy-menu-define nil (current-global-map) "foo"
'("Foo" ("Bar" :filter (lambda (ignored) (message "Hello!")))))
If you execute it in a running Emacs session, the filter function will
not be called. But if you put the form into a file, e.g. test.el, and
start Emacs with `emacs -Q -l test.el', you should see the "Hello!"
message in the echo area or in the *Messages* buffer respectively.
I expected the filter function to be called only when the menu is
being activated.
In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.6.4)
of 2005-04-23 on neutrino
Distributor `The XFree86 Project, Inc', version 11.0.40300001
configured using `configure '--with-gtk''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US
locale-coding-system: iso-latin-1
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
mouse-wheel-mode: t
tooltip-mode: t
menu-bar-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
line-number-mode: t
next-error-follow-minor-mode: Fol
Recent input:
M-x r e p o r t - e m <tab> <return>
Recent messages:
Loading mwheel...done
(emacs -Q -l test.el)
Loading disp-table...done
Loading image...done
For information about the GNU Project and its goals, type C-h C-p.
Loading easymenu...done
Hello!
Loading emacsbug...done
- Menu filter triggered too early,
Ralf Angeli <=
Re: Menu filter triggered too early, Richard Stallman, 2005/05/08