Commit b444e664 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

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.
parent f962e3cd
......@@ -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)))
......@@ -5909,10 +5909,10 @@ all parts."
(setq help-echo-owns-message t))
"%S: %s the MIME part; %S: more options"
(aref gnus-mouse-2 0)
(if (mm-handle-displayed-p (widget-get widget :mime-handle))
"hide" "show")
(aref gnus-down-mouse-3 0))))))
(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))
......@@ -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)
(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)
......@@ -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)))
......@@ -8971,8 +8968,8 @@ For example:
(setq help-echo-owns-message t))
"%S: show detail; %S: more options"
(aref gnus-mouse-2 0)
(aref gnus-down-mouse-3 0))))))
(defun gnus-mime-display-security (handle)
......@@ -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))))
(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]
;; 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))))))))
(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
,(format "%s: go to this bookmark in other window"
(aref gnus-mouse-2 0))))))
(setq gnus-bookmark-bmenu-hidden-bookmarks
(cdr gnus-bookmark-bmenu-hidden-bookmarks))
(forward-line 1))))))))
......@@ -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
......@@ -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
......@@ -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))
......@@ -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)
......@@ -458,7 +458,7 @@ Two predefined functions are available:
"\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
......@@ -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
......@@ -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
......@@ -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)
......@@ -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))))
......@@ -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 ()
(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)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment