diff options
| author | Karl Heuer | 1994-11-08 05:09:01 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-11-08 05:09:01 +0000 |
| commit | afaa65e4ead67ef0ab93fd7a7b7bf04375616f19 (patch) | |
| tree | 9505e343b75925787d9bec495d3129f13747c5a4 | |
| parent | 3d102c5902241dc4894c1b7672d91c7d27e2d286 (diff) | |
| download | emacs-afaa65e4ead67ef0ab93fd7a7b7bf04375616f19.tar.gz emacs-afaa65e4ead67ef0ab93fd7a7b7bf04375616f19.zip | |
(help-mode): New function.
(help-mode-map): Local keymap for help-mode. Empty for now.
(print-help-return-message): Fix misspelled var.
| -rw-r--r-- | lisp/help.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/help.el b/lisp/help.el index 2845ad96412..c11e2cb91bc 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -35,6 +35,9 @@ | |||
| 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 | 37 | ||
| 38 | (defvar help-mode-map (make-sparse-keymap) | ||
| 39 | "Keymap for help mode.") | ||
| 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 | ||
| @@ -80,6 +83,18 @@ | |||
| 80 | 83 | ||
| 81 | (define-key help-map "q" 'help-quit) | 84 | (define-key help-map "q" 'help-quit) |
| 82 | 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)) | ||
| 97 | |||
| 83 | (defun help-quit () | 98 | (defun help-quit () |
| 84 | (interactive) | 99 | (interactive) |
| 85 | nil) | 100 | nil) |
| @@ -145,7 +160,7 @@ If FUNCTION is nil, applies `message' to it, thus printing it." | |||
| 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))) |