diff options
| author | Richard M. Stallman | 1995-07-18 23:31:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-07-18 23:31:41 +0000 |
| commit | 9dd2b34edf2aefd90dddb511e5a72450a6b88572 (patch) | |
| tree | 48725501ac706bb9ccbd05663ae0374449f46668 | |
| parent | 4b4b65a6ca4d144ffce0b0856dfab2d6e31102ff (diff) | |
| download | emacs-9dd2b34edf2aefd90dddb511e5a72450a6b88572.tar.gz emacs-9dd2b34edf2aefd90dddb511e5a72450a6b88572.zip | |
(electric-helpify): Autoload with-electric-help, electric-helpify.
| -rw-r--r-- | lisp/ehelp.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/ehelp.el b/lisp/ehelp.el index b5d32ad851f..fb2cd370239 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | ;; This package provides a pre-packaged `Electric Help Mode' for | 26 | ;; This package provides a pre-packaged `Electric Help Mode' for |
| 27 | ;; browsing on-line help screens. There is one entry point, | 27 | ;; browsing on-line help screens. There is one entry point, |
| 28 | ;; `with-electric-help'; All you have to give it is a no-argument | 28 | ;; `with-electric-help'; all you have to give it is a no-argument |
| 29 | ;; function that generates the actual text of the help into the current | 29 | ;; function that generates the actual text of the help into the current |
| 30 | ;; buffer. | 30 | ;; buffer. |
| 31 | 31 | ||
| @@ -69,8 +69,9 @@ | |||
| 69 | ;(run-hooks 'electric-help-mode-hook) | 69 | ;(run-hooks 'electric-help-mode-hook) |
| 70 | ) | 70 | ) |
| 71 | 71 | ||
| 72 | ;;;###autoload | ||
| 72 | (defun with-electric-help (thunk &optional buffer noerase) | 73 | (defun with-electric-help (thunk &optional buffer noerase) |
| 73 | "Arguments are THUNK &optional BUFFER NOERASE. BUFFER defaults to \"*Help*\" | 74 | "Arguments are THUNK &optional BUFFER NOERASE. BUFFER defaults to `*Help*'. |
| 74 | THUNK is a function of no arguments which is called to initialize | 75 | THUNK is a function of no arguments which is called to initialize |
| 75 | the contents of BUFFER. BUFFER will be erased before THUNK is called unless | 76 | the contents of BUFFER. BUFFER will be erased before THUNK is called unless |
| 76 | NOERASE is non-nil. THUNK will be called with `standard-output' bound to | 77 | NOERASE is non-nil. THUNK will be called with `standard-output' bound to |
| @@ -81,7 +82,7 @@ in which BUFFER is displayed and allows the user to scroll through that buffer | |||
| 81 | in electric-help-mode. | 82 | in electric-help-mode. |
| 82 | When the user exits (with `electric-help-exit', or otherwise) the help | 83 | When the user exits (with `electric-help-exit', or otherwise) the help |
| 83 | buffer's window disappears (i.e., we use `save-window-excursion') | 84 | buffer's window disappears (i.e., we use `save-window-excursion') |
| 84 | BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit" | 85 | BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit." |
| 85 | (setq buffer (get-buffer-create (or buffer "*Help*"))) | 86 | (setq buffer (get-buffer-create (or buffer "*Help*"))) |
| 86 | (let ((one (one-window-p t)) | 87 | (let ((one (one-window-p t)) |
| 87 | (config (current-window-configuration)) | 88 | (config (current-window-configuration)) |
| @@ -207,6 +208,7 @@ will select it.)" | |||
| 207 | (sit-for 2)) | 208 | (sit-for 2)) |
| 208 | 209 | ||
| 209 | 210 | ||
| 211 | ;;;###autoload | ||
| 210 | (defun electric-helpify (fun) | 212 | (defun electric-helpify (fun) |
| 211 | (let ((name "*Help*")) | 213 | (let ((name "*Help*")) |
| 212 | (if (save-window-excursion | 214 | (if (save-window-excursion |