emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamically modifying menu entries


From: Stefan Monnier
Subject: Re: Dynamically modifying menu entries
Date: Tue, 20 Jul 2010 13:18:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> I am building a menu using `easy-menu-define' with a submenu whose
> entries are  dependent on the entries in a list in the package.
> The contents of the list may  change and based on those changes the
> contents of the submenu may change.  This  is not as simple as
> enabling/disabling menu entries; it involves adding and  removing
> entries based on the contents of the separate list.

If the set of possible entries is finite (and reasonably small), then
you can use :visible, but otherwise :filter is most likely the way to go.

> It also  does appear that the submenu doesn't get refreshed as
> frequently as I'd like.  Ideally, I'd like to be able to populate the
> submenu when it's selected rather than having to predefine the
> menu contents.

:filter should be run often enough (or even more often than that, in my
experience), so if it's not often enough for you, please report the
precise case where it fails to be (re)run.


        Stefan



reply via email to

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