]> code.delx.au - gnu-emacs/blobdiff - lisp/help.el
Add a new function `svg-embed'
[gnu-emacs] / lisp / help.el
index 57f358b9a72b681dae1bc897f1bacf1f65358053..b8485667ae03ff1f6ea60b2d08f576bba4372536 100644 (file)
@@ -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)
@@ -930,14 +946,15 @@ documentation for the major and minor modes of that buffer."
              (let ((mode-function (nth 0 mode))
                    (pretty-minor-mode (nth 1 mode))
                    (indicator (nth 2 mode)))
-               (add-text-properties 0 (length pretty-minor-mode)
-                                    '(face bold) pretty-minor-mode)
                (save-excursion
                  (goto-char (point-max))
                  (princ "\n\f\n")
                  (push (point-marker) help-button-cache)
                  ;; Document the minor modes fully.
-                 (insert pretty-minor-mode)
+                  (insert-text-button
+                   pretty-minor-mode 'type 'help-function
+                   'help-args (list mode-function)
+                   'button '(t))
                  (princ (format " minor mode (%s):\n"
                                 (if (zerop (length indicator))
                                     "no indicator"