all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
[parent not found: <<<<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>]
[parent not found: <<<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>]
[parent not found: <<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>]
* bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning
@ 2016-08-15 18:06 Drew Adams
  2020-12-12 20:24 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2016-08-15 18:06 UTC (permalink / raw)
  To: 24237

The doc for :filter says this about the FILTER-FN:

   Emacs can call this function at any time that it does redisplay or
   operates on menu data structures, so you should write it so it can
   safely be called at any time.

Is this true in general, or only when the extended menu item is put on a
menu?

A common idiom is to make use of a `menu-item' construct with a :filter
to create a conditional _keyboard_ key binding.  In such a case, the
`menu-item' construct is not a real menu item - it is not placed on any
menu.

I'm guessing that in such a case this doc paragraph does not apply.  If
this guess is correct then please correct the paragraph, so that it says
something like "If an extended menu item that uses :filter is placed on
a menu then Emacs can call FILTER-FN when...".

Also, is it really the case that FILTER-FN can be called anytime Emacs
does redisplay?  Shouldn't the doc say only that it can be called
anytime Emacs "operates on menu data structures"?  Does it get called by
redisplay other than when redisplay operates on menu data structures?
In the case mentioned above (binding to a keyboard key), would FILTER-FN
ever be called during redisplay?  I'm guessing that it would not.

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-12-20  1:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <<<<<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>
     [not found] ` <<<<<87v9d67ox6.fsf@gnus.org>
     [not found]   ` <<<<<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>
     [not found]     ` <<<<<83blexeod5.fsf@gnu.org>
     [not found]       ` <<<<e70746fb-1e56-4115-9fb8-1896c4e8b8d3@default>
     [not found]         ` <<<<83v9d5d1yd.fsf@gnu.org>
     [not found]           ` <<<846fcdf8-9b51-4246-8200-b067e7006e24@default>
     [not found]             ` <<<83y2hut6m7.fsf@gnu.org>
     [not found]               ` <<d15a8746-eb78-44b5-a4d6-af2285969b76@default>
     [not found]                 ` <<838s9ttxkk.fsf@gnu.org>
2020-12-19 19:35                   ` bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning Drew Adams
2020-12-20  0:05                     ` Stefan Kangas
2020-12-20  1:23                       ` Drew Adams
     [not found] <<<<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>
     [not found] ` <<<<87v9d67ox6.fsf@gnus.org>
     [not found]   ` <<<<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>
     [not found]     ` <<<<83blexeod5.fsf@gnu.org>
     [not found]       ` <<<e70746fb-1e56-4115-9fb8-1896c4e8b8d3@default>
     [not found]         ` <<<83v9d5d1yd.fsf@gnu.org>
     [not found]           ` <<846fcdf8-9b51-4246-8200-b067e7006e24@default>
     [not found]             ` <<83y2hut6m7.fsf@gnu.org>
2020-12-19 18:54               ` Drew Adams
2020-12-19 19:17                 ` Eli Zaretskii
     [not found] <<<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>
     [not found] ` <<<87v9d67ox6.fsf@gnus.org>
     [not found]   ` <<<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>
     [not found]     ` <<<83blexeod5.fsf@gnu.org>
     [not found]       ` <<e70746fb-1e56-4115-9fb8-1896c4e8b8d3@default>
     [not found]         ` <<83v9d5d1yd.fsf@gnu.org>
2020-12-13 19:52           ` Drew Adams
2020-12-19 10:47             ` Eli Zaretskii
     [not found] <<6c4f5089-43fa-4ca1-a656-1ec1684df960@default>
     [not found] ` <<87v9d67ox6.fsf@gnus.org>
     [not found]   ` <<70cc884d-4f32-4a2e-b3f5-181709f2ca29@default>
     [not found]     ` <<83blexeod5.fsf@gnu.org>
2020-12-13 17:24       ` Drew Adams
2020-12-13 17:56         ` Eli Zaretskii
2016-08-15 18:06 Drew Adams
2020-12-12 20:24 ` Lars Ingebrigtsen
2020-12-12 20:45   ` Drew Adams
2020-12-13 15:07     ` Eli Zaretskii

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.