From 011b0ad6b50df387f266e86cf818810a16e9f01f Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 16 Jul 2011 19:58:16 +0200 Subject: [PATCH] Document toolkit differences for menus (Toolkit Differences): New node with text from Tim Cross (tiny change) and Glenn Morris. --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/keymaps.texi | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 033c2fec65b..8eca2ccf52b 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-07-16 Lars Magne Ingebrigtsen + + * keymaps.texi (Toolkit Differences): New node with text from Tim + Cross (tiny change) and Glenn Morris. + 2011-07-15 Andreas Schwab * help.texi (Keys in Documentation): Revert last change. diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 15b2f2079ba..95f798c21d4 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2019,8 +2019,10 @@ an existing menu, you can specify its position in the menu using various features. * Menu Separators:: Drawing a horizontal line through a menu. * Alias Menu Items:: Using command aliases in menu items. +* Toolkit Differences:: Not all toolkits provide the same features. @end menu + @node Simple Menu Items @subsubsection Simple Menu Items @@ -2309,6 +2311,28 @@ itself). To request this, give the alias symbol a non-@code{nil} causes menu items for @code{make-read-only} and @code{make-writable} to show the keyboard bindings for @code{toggle-read-only}. +@node Toolkit Differences +@subsubsection Toolkit Differences + +The various toolkits with which you can build Emacs do not all support +the same set of features for menus. Some code works as expected with +one toolkit, but not under another. + +For example: menu actions or buttons in a top-level menu-bar. The +following works with the Lucid toolkit or on MS Windows, but not with +GTK or Nextstep, where clicking on the item has no effect. + +@example +(defun menu-action-greet () + (interactive) + (message "Hello Emacs User!")) + +(defun top-level-menu () + (interactive) + (define-key lisp-interaction-mode-map [menu-bar m] + '(menu-item "Action Button" menu-action-greet))) +@end example + @node Mouse Menus @subsection Menus and the Mouse -- 2.39.2