unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: emacs-devel@gnu.org
Cc: ding@gnus.org
Subject: mouse-1 click on widget button
Date: Mon, 21 Jan 2008 20:12:21 +0900	[thread overview]
Message-ID: <b4m3asrtotm.fsf@jpl.org> (raw)

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

             reply	other threads:[~2008-01-21 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 11:12 Katsumi Yamaoka [this message]
2008-01-22 13:13 ` mouse-1 click on widget button Piet van Oostrum

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=b4m3asrtotm.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@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 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).