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

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

RE: Button widget keymap conflicting with major mode.


From: Drew Adams
Subject: RE: Button widget keymap conflicting with major mode.
Date: Sat, 20 Feb 2010 21:54:04 -0800

> A read-only buffer has a major mode which defines bindings for RET and
> other keys which are also used by button widgets created by
> 
> (widget-create 'push-button ...
> 
> The bindings for the major mode override the button bindings 
> (it is not possible to user RET when the point is on the
> button for invoking it). I can make the button work with
> (use-local-map widget-keymap), but then the bindings for
> the major mode are gone.
> 
> Is there a way for RET invoking the button when the point is 
> over it and invoke the major mode binding otherwise?
> 
> Using Emacs 23.1.

`keymap' text property would be one way.

See node `Special Properties' of the Elisp manual.





reply via email to

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