]> code.delx.au - gnu-emacs/blobdiff - lisp/help.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / help.el
index d6cfae44183063cf386877cd90557e2296be00dd..baccf5988b8882bda14c658b0bbaf881b0def5e6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; help.el --- help commands for Emacs
 
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2015 Free Software
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2016 Free Software
 ;; Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
@@ -613,7 +613,15 @@ temporarily enables it to allow getting help on disabled items and buttons."
           (when (null (cdr yank-menu))
             (setq saved-yank-menu (copy-sequence yank-menu))
             (menu-bar-update-yank-menu "(any string)" nil))
-          (setq key (read-key-sequence "Describe key (or click or menu item): "))
+           (while
+               (progn
+                 (setq key (read-key-sequence "Describe the following key, mouse click, or menu item: "))
+                 (and (vectorp key)
+                      (consp (aref key 0))
+                      (symbolp (car (aref key 0)))
+                      (string-match "\\(mouse\\|down\\|click\\|drag\\)"
+                                    (symbol-name (car (aref key 0))))
+                      (not (sit-for (/ double-click-time 1000.0) t)))))
           ;; Clear the echo area message (Bug#7014).
           (message nil)
           ;; If KEY is a down-event, read and discard the
@@ -750,7 +758,15 @@ temporarily enables it to allow getting help on disabled items and buttons."
           (when (null (cdr yank-menu))
             (setq saved-yank-menu (copy-sequence yank-menu))
             (menu-bar-update-yank-menu "(any string)" nil))
-          (setq key (read-key-sequence "Describe key (or click or menu item): "))
+           (while
+               (progn
+                 (setq key (read-key-sequence "Describe the following key, mouse click, or menu item: "))
+                 (and (vectorp key)
+                      (consp (aref key 0))
+                      (symbolp (car (aref key 0)))
+                      (string-match "\\(mouse\\|down\\|click\\|drag\\)"
+                                    (symbol-name (car (aref key 0))))
+                      (not (sit-for (/ double-click-time 1000.0) t)))))
           (list
            key
            (prefix-numeric-value current-prefix-arg)