From b444e664d0a0be2eefe243345579bb0ebd08b112 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 10 Feb 2016 14:42:03 +1100 Subject: [PATCH] Remove Gnus compat names for mouse bindings * 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 | 29 +++++++++++++---------------- lisp/gnus/gnus-bookmark.el | 8 ++++---- lisp/gnus/gnus-ems.el | 7 ------- lisp/gnus/gnus-group.el | 2 +- lisp/gnus/gnus-icalendar.el | 3 +-- lisp/gnus/gnus-salt.el | 4 ++-- lisp/gnus/gnus-srvr.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/gnus-topic.el | 2 +- lisp/gnus/gnus.el | 2 +- lisp/gnus/mml.el | 3 +-- 11 files changed, 26 insertions(+), 38 deletions(-) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 96d2adbf566..ac967d25c40 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -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 diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 1a082c255b6..0cdbff09937 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -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)))))))) diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index 90687e150fd..02a9c7b6721 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el @@ -28,13 +28,6 @@ (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 diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 63125ef14ee..fe03c810d11 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -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 diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 050478bbc79..d277c0f5d57 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -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)) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index bc25ae691af..350921762a8 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -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 diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 7afd0539f72..9f56989b52a 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -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 diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 9d0d1fcda38..d47e6d02795 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -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 diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 35d0f3896e0..f1b3bd4c331 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -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) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index a9a7726c1fb..10a5f9b328e 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -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)))) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index c767ceb9061..c748e8ef874 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -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))) -- 2.39.2