Mercurial > emacs
comparison lisp/help.el @ 15799:2a1123f30c73
(help-fontify-buffer-function): Function deleted.
(help-mode): Set font-lock-defaults in simple way again.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 29 Jul 1996 23:39:34 +0000 |
parents | e8e74fb6da7d |
children | add6684a3e67 |
comparison
equal
deleted
inserted
replaced
15798:a745f54990f5 | 15799:2a1123f30c73 |
---|---|
105 ;; | 105 ;; |
106 ;; CLisp `:' keywords as references. | 106 ;; CLisp `:' keywords as references. |
107 (list (concat "\\<:" sym-char "+\\>") 0 'font-lock-reference-face t)))) | 107 (list (concat "\\<:" sym-char "+\\>") 0 'font-lock-reference-face t)))) |
108 "Default expressions to highlight in Help mode.") | 108 "Default expressions to highlight in Help mode.") |
109 | 109 |
110 (defun help-fontify-buffer-function () | |
111 ;; This function's symbol is bound to font-lock-fontify-buffer-function. | |
112 (let ((font-lock-fontify-region-function 'font-lock-default-fontify-region)) | |
113 ;; Fontify as normal. | |
114 (font-lock-default-fontify-buffer) | |
115 ;; Prevent Font Lock mode from kicking in. | |
116 (setq font-lock-fontified t))) | |
117 | |
118 (defun help-mode () | 110 (defun help-mode () |
119 "Major mode for viewing help text. | 111 "Major mode for viewing help text. |
120 Entry to this mode runs the normal hook `help-mode-hook'. | 112 Entry to this mode runs the normal hook `help-mode-hook'. |
121 Commands: | 113 Commands: |
122 \\{help-mode-map}" | 114 \\{help-mode-map}" |
124 (kill-all-local-variables) | 116 (kill-all-local-variables) |
125 (use-local-map help-mode-map) | 117 (use-local-map help-mode-map) |
126 (setq mode-name "Help") | 118 (setq mode-name "Help") |
127 (setq major-mode 'help-mode) | 119 (setq major-mode 'help-mode) |
128 (make-local-variable 'font-lock-defaults) | 120 (make-local-variable 'font-lock-defaults) |
129 (setq font-lock-defaults | 121 (setq font-lock-defaults '(help-font-lock-keywords)) |
130 '(help-font-lock-keywords nil nil nil nil | |
131 (font-lock-inhibit-thing-lock . (lazy-lock-mode)) | |
132 (font-lock-fontify-region-function . ignore) | |
133 (font-lock-fontify-buffer-function . help-fontify-buffer-function))) | |
134 (view-mode) | 122 (view-mode) |
135 (run-hooks 'help-mode-hook)) | 123 (run-hooks 'help-mode-hook)) |
136 | 124 |
137 (defun help-quit () | 125 (defun help-quit () |
138 (interactive) | 126 (interactive) |