From: charles@aurox.ch (Charles A. Roelli)
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 25784-done@debbugs.gnu.org
Subject: bug#25784: 25.2; mouse-1 binding in debbugs-gnu.el
Date: Mon, 20 Feb 2017 09:55:53 +0100 [thread overview]
Message-ID: <m2k28l8cme.fsf@aurox.ch> (raw)
In-Reply-To: <87d1eds2ed.fsf@detlef> (Michael Albinus's message of "Mon, 20 Feb 2017 09:16:26 +0100")
Thanks for looking into this, Michael. I realize now that this change
only makes sense if mouse-2 sets point when clicked, as it does in Gnus.
I think what follows is the correct way to do it, and it works as
expected.
--- debbugs-0.12/debbugs-gnu.el.~1~ 2016-10-31 22:02:05.000000000 +0100
+++ debbugs-0.12/debbugs-gnu.el 2017-02-19 12:56:02.000000000 +0100
@@ -909,7 +909,6 @@
(menu-map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "\r" 'debbugs-gnu-select-report)
- (define-key map [mouse-1] 'debbugs-gnu-select-report)
(define-key map [mouse-2] 'debbugs-gnu-select-report)
(define-key map "g" 'debbugs-gnu-rescan)
(define-key map "R" 'debbugs-gnu-show-all-blocking-reports)
@@ -1347,9 +1346,10 @@
(format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
(debbugs-gnu-summary-mode 1)))
-(defun debbugs-gnu-select-report ()
+(defun debbugs-gnu-select-report (&optional event)
"Select the report on the current line."
- (interactive)
+ (interactive "e")
+ (when event (mouse-set-point event))
;; We open the report messages.
(let* ((status (debbugs-gnu-current-status))
(id (cdr (assq 'id status)))
@@ -1587,7 +1587,6 @@
(let ((map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "\r" 'debbugs-gnu-select-usertag)
- (define-key map [mouse-1] 'debbugs-gnu-select-usertag)
(define-key map [mouse-2] 'debbugs-gnu-select-usertag)
map))
@@ -1665,9 +1664,10 @@
(set-buffer-modified-p nil)
(goto-char (point-min)))))
-(defun debbugs-gnu-select-usertag ()
+(defun debbugs-gnu-select-usertag (&optional event)
"Select the user tag on the current line."
- (interactive)
+ (interactive "e")
+ (when event (mouse-set-point event))
;; We open the bug reports.
(let ((args (get-text-property (line-beginning-position) 'tabulated-list-id)))
(when args (apply 'debbugs-gnu args))))
next prev parent reply other threads:[~2017-02-20 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-18 11:20 bug#25784: 25.2; mouse-1 binding in debbugs-gnu.el Charles A. Roelli
2017-02-18 13:43 ` Andreas Schwab
2017-02-19 11:22 ` Charles A. Roelli
2017-02-20 8:16 ` Michael Albinus
2017-02-20 8:55 ` Charles A. Roelli [this message]
2017-02-20 12:32 ` Michael Albinus
2017-02-20 19:40 ` Charles A. Roelli
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=m2k28l8cme.fsf@aurox.ch \
--to=charles@aurox.ch \
--cc=25784-done@debbugs.gnu.org \
--cc=michael.albinus@gmx.de \
--cc=schwab@linux-m68k.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).