Mercurial > emacs
comparison lisp/help.el @ 9833:5215339470b8
(help-mode): New function.
(help-mode-map): Local keymap for help-mode. Empty for now.
(print-help-return-message): Fix misspelled var.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 08 Nov 1994 05:09:01 +0000 |
parents | 7cad0025f303 |
children | f810a558acf6 |
comparison
equal
deleted
inserted
replaced
9832:f0c8517d9d8a | 9833:5215339470b8 |
---|---|
32 ;; or run interpreted, but not when the compiled code is loaded. | 32 ;; or run interpreted, but not when the compiled code is loaded. |
33 (eval-when-compile (require 'help-macro)) | 33 (eval-when-compile (require 'help-macro)) |
34 | 34 |
35 (defvar help-map (make-sparse-keymap) | 35 (defvar help-map (make-sparse-keymap) |
36 "Keymap for characters following the Help key.") | 36 "Keymap for characters following the Help key.") |
37 | |
38 (defvar help-mode-map (make-sparse-keymap) | |
39 "Keymap for help mode.") | |
37 | 40 |
38 (define-key global-map (char-to-string help-char) 'help-command) | 41 (define-key global-map (char-to-string help-char) 'help-command) |
39 (fset 'help-command help-map) | 42 (fset 'help-command help-map) |
40 | 43 |
41 (define-key help-map (char-to-string help-char) 'help-for-help) | 44 (define-key help-map (char-to-string help-char) 'help-for-help) |
77 (define-key help-map "w" 'where-is) | 80 (define-key help-map "w" 'where-is) |
78 | 81 |
79 (define-key help-map "v" 'describe-variable) | 82 (define-key help-map "v" 'describe-variable) |
80 | 83 |
81 (define-key help-map "q" 'help-quit) | 84 (define-key help-map "q" 'help-quit) |
85 | |
86 (defun help-mode () | |
87 "Major mode for viewing help text. | |
88 Entry to this mode runs the normal hook `help-mode-hook'. | |
89 Commands: | |
90 \\{help-mode-map}" | |
91 (interactive) | |
92 (kill-all-local-variables) | |
93 (use-local-map help-mode-map) | |
94 (setq mode-name "Help") | |
95 (setq major-mode 'help-mode) | |
96 (run-hooks 'help-mode-hook)) | |
82 | 97 |
83 (defun help-quit () | 98 (defun help-quit () |
84 (interactive) | 99 (interactive) |
85 nil) | 100 nil) |
86 | 101 |
143 special-display-buffer-names) | 158 special-display-buffer-names) |
144 (let (found | 159 (let (found |
145 (tail special-display-regexps) | 160 (tail special-display-regexps) |
146 (name (buffer-name standard-output))) | 161 (name (buffer-name standard-output))) |
147 (while (and tail (not found)) | 162 (while (and tail (not found)) |
148 (if (or (and (consp (car taiul)) | 163 (if (or (and (consp (car tail)) |
149 (string-match (car (car tail)) name)) | 164 (string-match (car (car tail)) name)) |
150 (and (stringp (car tail)) | 165 (and (stringp (car tail)) |
151 (string-match (car tail) name))) | 166 (string-match (car tail) name))) |
152 (setq found t)) | 167 (setq found t)) |
153 (setq tail (cdr tail))) | 168 (setq tail (cdr tail))) |