[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: menu-bar: disable items when no frame visible
From: |
Juri Linkov |
Subject: |
Re: menu-bar: disable items when no frame visible |
Date: |
Sat, 24 Dec 2005 22:12:27 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> 2. Why keymap variables are replaced with their values at the moment
> of adding a menu item? I.e. what changes like the following achieve?
>
> (define-key menu-bar-edit-menu [bookmark]
> - '(menu-item "Bookmarks" menu-bar-bookmark-map
> + `(menu-item "Bookmarks" ,menu-bar-bookmark-map
> :help "Record positions and jump between them"))
>
> I think a symbol in such a position means to use its function
> definition, not its value. Thus, unless I am misremembering, the
> first version would not work at all. Was it ever really in use?
Actually, both versions work correctly. I guess the first version works
because menu operations can read the value of the map variable, and the
second version works because functions that modify the menu operate
directly on the Lisp structure by modifying its cells. I don't know
which of these two variants is more preferable.
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: menu-bar: disable items when no frame visible, (continued)
- Re: menu-bar: disable items when no frame visible, Stefan Monnier, 2005/12/25
- Re: menu-bar: disable items when no frame visible, Richard M. Stallman, 2005/12/25
- Re: menu-bar: disable items when no frame visible, Stefan Monnier, 2005/12/26
- Re: menu-bar: disable items when no frame visible, Richard M. Stallman, 2005/12/26
- Re: menu-bar: disable items when no frame visible, Juri Linkov, 2005/12/27
- Re: menu-bar: disable items when no frame visible, Stefan Monnier, 2005/12/27
- Re: menu-bar: disable items when no frame visible, Richard M. Stallman, 2005/12/24
- Re: menu-bar: disable items when no frame visible,
Juri Linkov <=