# HG changeset patch # User Dave Love # Date 891856615 0 # Node ID a14e82c3a69e97fbd261f350f212f1c81d38e036 # Parent f245110aa6190fc89bde1b37ca1bbaa4a2ee5590 (help-make-xrefs): Grok commands in keymap table expansions. (help-xref-button): Simplify. (help-make-xrefs): Set overriding keymap properly. diff -r f245110aa619 -r a14e82c3a69e lisp/help.el --- a/lisp/help.el Mon Apr 06 09:49:37 1998 +0000 +++ b/lisp/help.el Mon Apr 06 09:56:55 1998 +0000 @@ -937,7 +937,29 @@ "\\ (move-to-column col) 0) + (looking-at "\\(\\sw\\|\\s_\\)+$")) + ;; + (let ((sym (intern-soft (match-string 0)))) + (if (fboundp sym) + (help-xref-button + 0 #'describe-function sym)))) + t) + (zerop (forward-line)) + (move-to-column 0))))))) (set-syntax-table stab)) ;; Make a back-reference in this buffer if appropriate. (when help-xref-stack @@ -951,6 +973,7 @@ (set (make-local-variable 'minor-mode-overriding-map-alist) (list (cons 'view-mode (let ((map (make-sparse-keymap))) + (set-keymap-parent map view-mode-map) (define-key map "\r" 'help-follow) map)))) (set-buffer-modified-p old-modified)))) @@ -962,19 +985,17 @@ regexp. FUNCTION is a function to invoke when the button is activated, applied to DATA. DATA may be a single value or a list. See `help-make-xrefs'." - (put-text-property (match-beginning match-number) + (add-text-properties (match-beginning match-number) (match-end match-number) - 'mouse-face 'highlight) - (if help-highlight-p - (put-text-property (match-beginning match-number) - (match-end match-number) - 'face help-highlight-face)) - (put-text-property (match-beginning match-number) - (match-end match-number) + (list 'mouse-face 'highlight 'help-xref (cons function (if (listp data) data (list data))))) + (if help-highlight-p + (put-text-property (match-beginning match-number) + (match-end match-number) + 'face help-highlight-face))) ;; Additional functions for (re-)creating types of help buffers. @@ -1048,8 +1069,8 @@ (let (pos) (while (not pos) (if (get-text-property (point) 'help-xref) ; move off reference - (or (goto-char (next-single-property-change (point) 'help-xref)) - (point))) + (goto-char (or (next-single-property-change (point) 'help-xref) + (point)))) (cond ((setq pos (next-single-property-change (point) 'help-xref)) (if pos (goto-char pos))) ((bobp)