all messages for Emacs-related lists mirrored at yhetil.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

* Re: mouse-1 click on widget button
  2008-01-21 11:12 mouse-1 click on widget button Katsumi Yamaoka
@ 2008-01-22 13:13 ` Piet van Oostrum
  0 siblings, 0 replies; 2+ messages in thread
From: Piet van Oostrum @ 2008-01-22 13:13 UTC (permalink / raw)
  To: emacs-devel

>>>>> Katsumi Yamaoka <yamaoka@jpl.org> (KY) wrote:

>KY> Hi,
>KY> I use this:

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

>KY> Even so, mouse-1 click on a url string in the Gnus article buffer
>KY> raises the web browser.  It is because Gnus puts a widget button
>KY> on a text which looks like a url[1], and the button is sensitive
>KY> to mouse-1 as well as mouse-2 because of the default value of
>KY> `widget-keymap'[2] defined in wid-edit.el as follows:
[snip]
>KY> It annoyed me since I usually click mouse-1 on an Emacs frame in
>KY> order to move the point, to select the frame, to copy text, etc.
>KY> When I click a url string accidentally, the web browser launches
>KY> regardless of my will.  I was often vexed by this and now I have:

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

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

You can easily avoid this by setting mouse-1-click-follows-link to nil.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org

^ 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 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.