bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8176: 24.0.50; GUI toolkit differences


From: Lars Magne Ingebrigtsen
Subject: bug#8176: 24.0.50; GUI toolkit differences
Date: Fri, 15 Jul 2011 18:33:10 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Tim Cross <address@hidden> writes:

> OK, here is my attempt to draft an addition for 12.17.1 which may help
> highlight the fact that not all toolkits are equivalent and what is
> possible in some toolkits may not be possible in another.

What node is this for?  That is, what's the name of the node?

> "It should be noted that not all GUI toolkits used by emacs are
> equivalent. Some toolkits have specific constraints on how they are
> used. These constraints may be due to technical limitations of the
> toolkit or they may represent deliberate design choices. It is
> possible to implement elisp which works as expected under one toolkit
> and either does not work under another or gives unexpected results.
>
> An exmaple of this is the use of menu actions or buttons in a top
> level menu-bar. The following code will work in a top level menu when
> emacs is built with either the Lucid X toolkit or on MS Windows, but
> will fail to work correctly when emacs is built against the GTK+ or
> NextStep toolkits. Under these toolkits, the code compiles and the
> menu item appears in the top level menu, but clicking on the item
> fails to execute the associated action.
>
> (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)))

This looks reasonable to me (modulo a few typos :-).  A change of this
size needs copyright assignment to the FSF, though.  Do you have such
paperwork on file?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





reply via email to

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