unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mouse-1 click on widget button
@ 2008-01-21 11:12 Katsumi Yamaoka
  2008-01-22 13:13 ` Piet van Oostrum
  0 siblings, 1 reply; 2+ messages in thread
From: Katsumi Yamaoka @ 2008-01-21 11:12 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

Hi,

I use this:

(setq mouse-1-click-follows-link nil
      mouse-1-click-in-non-selected-windows nil)

Even so, mouse-1 click on a url string in the Gnus article buffer
raises the web browser.  It is because Gnus puts a widget button
on a text which looks like a url[1], and the button is sensitive
to mouse-1 as well as mouse-2 because of the default value of
`widget-keymap'[2] defined in wid-edit.el as follows:

(defvar widget-keymap
[...]
    (define-key map [down-mouse-2] 'widget-button-click)
    (define-key map [down-mouse-1] 'widget-button-click)

The changelog relevant to this is:

2006-02-14  Chong Yidong  <cyd@stupidchicken.com>

	* wid-edit.el (widget-keymap): Bind down-mouse-1 to
	widget-button-click.

	* cus-edit.el (custom-mode-map): Remove mouse-1 binding.
	(custom-mode): Update docstring.

	* cus-theme.el (custom-new-theme-mode-map): Remove mouse-1
	binding.

It annoyed me since I usually click mouse-1 on an Emacs frame in
order to move the point, to select the frame, to copy text, etc.
When I click a url string accidentally, the web browser launches
regardless of my will.  I was often vexed by this and now I have:

(eval-after-load "wid-edit"
  '(define-key widget-keymap [down-mouse-1] nil))

Because of the default value of `mouse-1-click-follows-link',
mouse-1 click behaves like moude-2 now even if there is no
mouse-1 binding in `widget-keymap'.  Why don't we remove it from
`widget-keymap'?

Regards,

[1] `gnus-article-add-buttons' adds a widget button if
`gnus-treat-buttonize' is non-nil (the default).

[2] `gnus-article-mode-map' is set so that its parent is
`widget-keymap'.

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

end of thread, other threads:[~2008-01-22 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21 11:12 mouse-1 click on widget button Katsumi Yamaoka
2008-01-22 13:13 ` Piet van Oostrum

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).