]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove Gnus compat names for mouse bindings
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 10 Feb 2016 03:42:03 +0000 (14:42 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 10 Feb 2016 03:42:03 +0000 (14:42 +1100)
* lisp/gnus/gnus-ems.el (gnus-widget-button-keymap): Remove.
(gnus-down-mouse-2): Remove.
(gnus-down-mouse-3): Remove.

lisp/gnus/gnus-art.el
lisp/gnus/gnus-bookmark.el
lisp/gnus/gnus-ems.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-icalendar.el
lisp/gnus/gnus-salt.el
lisp/gnus/gnus-srvr.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-topic.el
lisp/gnus/gnus.el
lisp/gnus/mml.el

index 96d2adbf566f2580f19eb54b9562edc995871a6a..ac967d25c40da52ab461513df2fbf5c0cad742b5 100644 (file)
@@ -4899,8 +4899,8 @@ General format specifiers can also be used.  See Info node
 
 (defvar gnus-mime-button-map
   (let ((map (make-sparse-keymap)))
-    (define-key map gnus-mouse-2 'gnus-article-push-button)
-    (define-key map gnus-down-mouse-3 'gnus-mime-button-menu)
+    (define-key map [mouse-2] 'gnus-article-push-button)
+    (define-key map [down-mouse-3] 'gnus-mime-button-menu)
     (dolist (c gnus-mime-button-commands)
       (define-key map (cadr c) (car c)))
     map))
@@ -5909,10 +5909,10 @@ all parts."
           (setq help-echo-owns-message t))
        (format
        "%S: %s the MIME part; %S: more options"
-       (aref gnus-mouse-2 0)
+       'mouse-2
        (if (mm-handle-displayed-p (widget-get widget :mime-handle))
            "hide" "show")
-       (aref gnus-down-mouse-3 0))))))
+       'down-mouse-3)))))
 
 (defun gnus-widget-press-button (elems _el)
   (goto-char (widget-get elems :from))
@@ -6203,8 +6203,7 @@ If nil, don't show those extra buttons."
             article-type multipart
             rear-nonsticky t))
          (widget-convert-button 'link from (point)
-                                :action 'gnus-widget-press-button
-                                :button-keymap gnus-widget-button-keymap)
+                                :action 'gnus-widget-press-button)
          ;; Do the handles
          (while (setq handle (pop handles))
            (gnus-add-text-properties
@@ -6228,8 +6227,7 @@ If nil, don't show those extra buttons."
               gnus-data ,handle
               rear-nonsticky t))
            (widget-convert-button 'link from (point)
-                                  :action 'gnus-widget-press-button
-                                  :button-keymap gnus-widget-button-keymap)
+                                  :action 'gnus-widget-press-button)
            (insert "  "))
          (insert "\n\n"))
        (when preferred
@@ -8194,8 +8192,7 @@ url is put as the `gnus-button-url' overlay property on the button."
          (and data (list 'gnus-data data))))
   (widget-convert-button 'link from to :action 'gnus-widget-press-button
                         :help-echo (or text "Follow the link")
-                        :keymap gnus-url-button-map
-                        :button-keymap gnus-widget-button-keymap))
+                        :keymap gnus-url-button-map))
 
 (defun gnus-article-copy-string ()
   "Copy the string in the button to the kill ring."
@@ -8500,13 +8497,13 @@ url is put as the `gnus-button-url' overlay property on the button."
 
 (defvar gnus-prev-page-map
   (let ((map (make-sparse-keymap)))
-    (define-key map gnus-mouse-2 'gnus-button-prev-page)
+    (define-key map [mouse-2] 'gnus-button-prev-page)
     (define-key map "\r" 'gnus-button-prev-page)
     map))
 
 (defvar gnus-next-page-map
   (let ((map (make-sparse-keymap)))
-    (define-key map gnus-mouse-2 'gnus-button-next-page)
+    (define-key map [mouse-2] 'gnus-button-next-page)
     (define-key map "\r" 'gnus-button-next-page)
     map))
 
@@ -8820,8 +8817,8 @@ For example:
 
 (defvar gnus-mime-security-button-map
   (let ((map (make-sparse-keymap)))
-    (define-key map gnus-mouse-2 'gnus-article-push-button)
-    (define-key map gnus-down-mouse-3 'gnus-mime-security-button-menu)
+    (define-key map [mouse-2] 'gnus-article-push-button)
+    (define-key map [down-mouse-3] 'gnus-mime-security-button-menu)
     (dolist (c gnus-mime-security-button-commands)
       (define-key map (cadr c) (car c)))
     map))
@@ -8971,8 +8968,8 @@ For example:
         (setq help-echo-owns-message t))
        (format
        "%S: show detail; %S: more options"
-       (aref gnus-mouse-2 0)
-       (aref gnus-down-mouse-3 0))))))
+       'mouse-2
+       'down-mouse-3)))))
 
 (defun gnus-mime-display-security (handle)
   (save-restriction
index 1a082c255b675373de2f356c7e32eb70b80b1507..0cdbff09937234cf20c7c5a79ee4737aacbf0d59 100644 (file)
@@ -400,7 +400,7 @@ deletion, or > if it is flagged for displaying."
               (insert "\n")))
           `(mouse-face highlight follow-link t
                        help-echo ,(format "%s: go to this article"
-                                          (aref gnus-mouse-2 0))))
+                                          'mouse-2)))
        (insert name "\n")))
     (goto-char (point-min))
     (forward-line 2)
@@ -463,7 +463,7 @@ That is, all information but the name."
   (define-key gnus-bookmark-bmenu-mode-map "s" 'gnus-bookmark-bmenu-save)
   (define-key gnus-bookmark-bmenu-mode-map "t" 'gnus-bookmark-bmenu-toggle-infos)
   (define-key gnus-bookmark-bmenu-mode-map "a" 'gnus-bookmark-bmenu-show-details)
-  (define-key gnus-bookmark-bmenu-mode-map gnus-mouse-2
+  (define-key gnus-bookmark-bmenu-mode-map [mouse-2]
     'gnus-bookmark-bmenu-select-by-mouse))
 
 ;; Bookmark Buffer Menu mode is suitable only for specially formatted
@@ -561,7 +561,7 @@ Optional argument SHOW means show them unconditionally."
           `(mouse-face highlight
             follow-link t
             help-echo ,(format "%s: go to this article"
-                               (aref gnus-mouse-2 0))))))))
+                               'mouse-2)))))))
 
 (defun gnus-bookmark-kill-line (&optional newline-too)
   "Kill from point to end of line.
@@ -611,7 +611,7 @@ Does not affect the kill ring."
                         follow-link t
                         help-echo
                         ,(format "%s: go to this bookmark in other window"
-                                 (aref gnus-mouse-2 0))))))
+                                 'mouse-2)))))
                 (setq gnus-bookmark-bmenu-hidden-bookmarks
                       (cdr gnus-bookmark-bmenu-hidden-bookmarks))
                 (forward-line 1))))))))
index 90687e150fd66de6cb60eab97fa7a5d2b00c2607..02a9c7b6721b9ee08594b16c1186c37f6c061511 100644 (file)
   (require 'cl)
   (require 'ring))
 
-;;; Function aliases later to be redefined for XEmacs usage.
-
-(defvar gnus-mouse-2 [mouse-2])
-(defvar gnus-down-mouse-3 [down-mouse-3])
-(defvar gnus-down-mouse-2 [down-mouse-2])
-(defvar gnus-widget-button-keymap nil)
-
 (provide 'gnus-ems)
 
 ;;; gnus-ems.el ends here
index 63125ef14eeb28b13201b5ed69500332e88e5322..fe03c810d11959706b40ef19d2f42e34f85b34bd 100644 (file)
@@ -632,7 +632,7 @@ simple manner.")
   "\C-c\C-i" gnus-info-find-node
   "\M-e" gnus-group-edit-group-method
   "^" gnus-group-enter-server-mode
-  gnus-mouse-2 gnus-mouse-pick-group
+  [mouse-2] gnus-mouse-pick-group
   [follow-link] 'mouse-face
   "<" beginning-of-buffer
   ">" end-of-buffer
index 050478bbc79243e06935da05254d1bb7b7c6b842..d277c0f5d576d9508a30190310aa67393db6bc25 100644 (file)
@@ -770,8 +770,7 @@ These will be used to retrieve the RSVP information from ical events."
        face ,gnus-article-button-face
        gnus-data ,data))
     (widget-convert-button 'link start (point)
-                           :action 'gnus-widget-press-button
-                           :button-keymap gnus-widget-button-keymap)))
+                           :action 'gnus-widget-press-button)))
 
 (defun gnus-icalendar-send-buffer-by-mail (buffer-name subject)
   (let ((message-signature nil))
index bc25ae691afb9b7be778cc5931e8f00d1dd96247..350921762a8dce402931e63eaed42312f71e5b52 100644 (file)
@@ -76,7 +76,7 @@ It accepts the same format specs that `gnus-summary-line-format' does."
       " " gnus-pick-next-page
       "u" gnus-pick-unmark-article-or-thread
       "." gnus-pick-article-or-thread
-      gnus-down-mouse-2 gnus-pick-mouse-pick-region
+      [down-mouse-2] gnus-pick-mouse-pick-region
       "\r" gnus-pick-start-reading)
     map))
 
@@ -458,7 +458,7 @@ Two predefined functions are available:
     (gnus-define-keys
         map
       "\r" gnus-tree-select-article
-      gnus-mouse-2 gnus-tree-pick-article
+      [mouse-2] gnus-tree-pick-article
       "\C-?" gnus-tree-read-summary-keys
       "h" gnus-tree-show-summary
 
index 7afd0539f726e0349b791af3f16d95798e072c23..9f56989b52ad62bf12dab8dfe200a3a49a5d551f 100644 (file)
@@ -156,7 +156,7 @@ If nil, a faster, but more primitive, buffer is used instead."
   (gnus-define-keys gnus-server-mode-map
     " " gnus-server-read-server-in-server-buffer
     "\r" gnus-server-read-server
-    gnus-mouse-2 gnus-server-pick-server
+    [mouse-2] gnus-server-pick-server
     "q" gnus-server-exit
     "l" gnus-server-list-servers
     "k" gnus-server-kill-server
index 9d0d1fcda385ffab2db7f69b5f1e3553fc9883cc..d47e6d027955d118452edb5c51023e0c8af75c30 100644 (file)
@@ -1936,7 +1936,7 @@ increase the score of each group you read."
   "q" gnus-summary-exit
   "Q" gnus-summary-exit-no-update
   "\C-c\C-i" gnus-info-find-node
-  gnus-mouse-2 gnus-mouse-pick-article
+  [mouse-2] gnus-mouse-pick-article
   [follow-link] mouse-face
   "m" gnus-summary-mail-other-window
   "a" gnus-summary-post-news
index 35d0f3896e0d5017ac2adccb95cd4bf185b26b2b..f1b3bd4c331fac315e63e3de4339bddddf5a5f40 100644 (file)
@@ -1065,7 +1065,7 @@ articles in the topic and its subtopics."
     [(meta tab)] gnus-topic-unindent
     "\C-i" gnus-topic-indent
     "\M-\C-i" gnus-topic-unindent
-    gnus-mouse-2 gnus-mouse-pick-topic)
+    [mouse-2] gnus-mouse-pick-topic)
 
   ;; Define a new submap.
   (gnus-define-keys (gnus-group-topic-map "T" gnus-group-mode-map)
index a9a7726c1fbbdac39fd74d3cfc1cd7b4b4e03588..10a5f9b328ebe2f4040b45f8b0a8f7de9418dcaf 100644 (file)
@@ -3026,7 +3026,7 @@ See Info node `(gnus)Formatting Variables'."
 
 (defun gnus-suppress-keymap (keymap)
   (suppress-keymap keymap)
-  (let ((keys `([delete] "\177" "\M-u"))) ;gnus-mouse-2
+  (let ((keys `([delete] "\177" "\M-u"))) ;[mouse-2]
     (while keys
       (define-key keymap (pop keys) 'undefined))))
 
index c767ceb906181b8e085b19e77fac906a59d38c84..c748e8ef8744f96e39c9e955eddb891b6bfe57f8 100644 (file)
@@ -50,7 +50,6 @@
 (autoload 'message-mail-p         "message")
 
 (defvar gnus-article-mime-handles)
-(defvar gnus-mouse-2)
 (defvar gnus-newsrc-hashtb)
 (defvar message-default-charset)
 (defvar message-deletable-headers)
@@ -1602,7 +1601,7 @@ or the `pop-to-buffer' function."
                     (lambda ()
                       (interactive)
                       (widget-button-press (point))))
-      (local-set-key gnus-mouse-2
+      (local-set-key [mouse-2]
                     (lambda (event)
                       (interactive "@e")
                       (widget-button-press (widget-event-point event) event)))