all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Button widget keymap conflicting with major mode.
Date: Fri, 26 Feb 2010 00:41:25 -0700	[thread overview]
Message-ID: <hm7tv8$hio$1@dough.gmane.org> (raw)
In-Reply-To: <65FB5493D9934E70A5A57B970B29C731@us.oracle.com>

Drew Adams wrote:
>> WIBNI widget-create took a :keymap keyword so you could specify
>> widget-keymap as its value?
> 
> It does, doesn't it? You can pass any keyword args to it.

Excellent, I didn't try...

> Not sure I understand what you're saying.

... because the Widget info manual doesn't say that the push-button
widget is/like an editable-field or text widget, which are the only
types that support the :keymap property.

> (widget-create 'push-button :keymap widget-keymap) `C-x C-e'
> 
> =>
> 
> (push-button
>  :keymap
>  (keymap
>   (13 . widget-button-press)
>   (down-mouse-1 . widget-button-click)
>   (down-mouse-2 . widget-button-click)
>   (backtab . widget-backward)
>   (S-tab . widget-backward)
>   (27 keymap (9 . widget-backward))
>   (9 . widget-forward))
>  :button-overlay #<overlay from 242 to 244 in *scratch*> :from #<marker
>  (moves after insertion)
>  at 242 in *scratch*> :to #<marker at 244 in *scratch*>)
> 
> `C-u C-x =' on the button (e.g. position 243) shows:
> 
> There is an overlay here:
>  From 242 to 244
>   button               push-button (widget)Top
>   evaporate            t
>   face                 widget-button
>   follow-link          nil
>   help-echo            nil
>   keymap               [Show]
>   mouse-face           (highlight)
>   pointer              hand
> 
> Clicking [Show] or hitting RET there shows the same keymap as above.

Well, that's the clincher: the keymap was actually installed on the keymap
property of the overlay (not just included in the widget's list representation).

-- 
Kevin Rodgers
Denver, Colorado, USA





      reply	other threads:[~2010-02-26  7:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-21  4:07 Button widget keymap conflicting with major mode Óscar Fuentes
2010-02-21  5:54 ` Drew Adams
2010-02-24  4:29   ` Kevin Rodgers
2010-02-24  5:18     ` Drew Adams
2010-02-26  7:41       ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hm7tv8$hio$1@dough.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.