aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-01-28 23:27:51 +0000
committerDave Love2000-01-28 23:27:51 +0000
commit4607e12b53afe473f6a638f5e29f1173cb8aa902 (patch)
treedf179f85a7392006a1d1a36cc0ca4910ebe8239a
parent142e109c5843113371b01f6534ff8715712800bb (diff)
downloademacs-4607e12b53afe473f6a638f5e29f1173cb8aa902.tar.gz
emacs-4607e12b53afe473f6a638f5e29f1173cb8aa902.zip
(help-xref-symbol-regexp, help-xref-info-regexp): Use defconst,
purecopy. (help-back-label): Purecopy it.
-rw-r--r--lisp/help.el38
1 files changed, 9 insertions, 29 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 818f35aa539..a38d6214829 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -104,26 +104,6 @@
104;; Documentation only, since we use minor-mode-overriding-map-alist. 104;; Documentation only, since we use minor-mode-overriding-map-alist.
105(define-key help-mode-map "\r" 'help-follow) 105(define-key help-mode-map "\r" 'help-follow)
106 106
107;; Font-locking is incompatible with the new xref stuff.
108;(defvar help-font-lock-keywords
109; (eval-when-compile
110; (let ((name-char "[-+a-zA-Z0-9_*]") (sym-char "[-+a-zA-Z0-9_:*]"))
111; (list
112; ;;
113; ;; The symbol itself.
114; (list (concat "\\`\\(" name-char "+\\)\\(\\(:\\)\\|\\('\\)\\)")
115; '(1 (if (match-beginning 3)
116; font-lock-function-name-face
117; font-lock-variable-name-face)))
118; ;;
119; ;; Words inside `' which tend to be symbol names.
120; (list (concat "`\\(" sym-char sym-char "+\\)'")
121; 1 'font-lock-constant-face t)
122; ;;
123; ;; CLisp `:' keywords as references.
124; (list (concat "\\<:" sym-char "+\\>") 0 'font-lock-builtin-face t))))
125; "Default expressions to highlight in Help mode.")
126
127(defvar help-xref-stack nil 107(defvar help-xref-stack nil
128 "A stack of ways by which to return to help buffers after following xrefs. 108 "A stack of ways by which to return to help buffers after following xrefs.
129Used by `help-follow' and `help-xref-go-back'. 109Used by `help-follow' and `help-xref-go-back'.
@@ -966,22 +946,22 @@ Must be previously-defined."
966 :version "20.3" 946 :version "20.3"
967 :type 'face) 947 :type 'face)
968 948
969(defvar help-back-label "[back]" 949(defvar help-back-label (purecopy "[back]")
970 "Label to use by `help-make-xrefs' for the go-back reference.") 950 "Label to use by `help-make-xrefs' for the go-back reference.")
971 951
972(defvar help-xref-symbol-regexp 952(defconst help-xref-symbol-regexp
973 (concat "\\(\\<\\(\\(variable\\|option\\)\\|" 953 (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|"
974 "\\(function\\|command\\)\\|" 954 "\\(function\\|command\\)\\|"
975 "\\(symbol\\)\\)\\s-+\\)?" 955 "\\(symbol\\)\\)\\s-+\\)?"
976 ;; Note starting with word-syntax character: 956 ;; Note starting with word-syntax character:
977 "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'") 957 "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'"))
978 "Regexp matching doc string references to symbols. 958 "Regexp matching doc string references to symbols.
979 959
980The words preceding the quoted symbol can be used in doc strings to 960The words preceding the quoted symbol can be used in doc strings to
981distinguish references to variables, functions and symbols.") 961distinguish references to variables, functions and symbols.")
982 962
983(defvar help-xref-info-regexp 963(defconst help-xref-info-regexp
984 "\\<[Ii]nfo[ \t\n]+node[ \t\n]+`\\([^']+\\)'" 964 (purecopy "\\<[Ii]nfo[ \t\n]+node[ \t\n]+`\\([^']+\\)'")
985 "Regexp matching doc string references to an Info node.") 965 "Regexp matching doc string references to an Info node.")
986 966
987(defun help-setup-xref (item interactive-p) 967(defun help-setup-xref (item interactive-p)