GNU bug report logs - #25784
25.2; mouse-1 binding in debbugs-gnu.el

Previous Next

Package: emacs;

Reported by: charles <at> aurox.ch (Charles A. Roelli)

Date: Sat, 18 Feb 2017 11:21:02 UTC

Severity: normal

Found in version 25.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 25784-done <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>, 25784-done <at> debbugs.gnu.org
Subject: Re: bug#25784: 25.2; mouse-1 binding in debbugs-gnu.el
Date: Mon, 20 Feb 2017 09:55:53 +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))))




This bug report was last modified 8 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.