diff options
| author | Richard M. Stallman | 1995-07-30 07:04:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-07-30 07:04:58 +0000 |
| commit | bbe2ecf64b3c3540a66c5bee81ad4a20c93fd6ff (patch) | |
| tree | 18cdd5d2b0558518fc5665e41fbb66d0997a0fff | |
| parent | 639f52d85873d09bc1b0e53ab55dbaf25c4299f2 (diff) | |
| download | emacs-bbe2ecf64b3c3540a66c5bee81ad4a20c93fd6ff.tar.gz emacs-bbe2ecf64b3c3540a66c5bee81ad4a20c93fd6ff.zip | |
(with-electric-help): Doc fix.
| -rw-r--r-- | lisp/ehelp.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ehelp.el b/lisp/ehelp.el index fb2cd370239..fda84b7a357 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el | |||
| @@ -29,6 +29,12 @@ | |||
| 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 | ||
| 32 | ;; To make this the default, you must do | ||
| 33 | ;; (require 'ehelp) | ||
| 34 | ;; (define-key global-map "\C-h" 'ehelp-command) | ||
| 35 | ;; (define-key global-map [help] 'ehelp-command) | ||
| 36 | ;; (define-key global-map [f1] 'ehelp-command) | ||
| 37 | |||
| 32 | ;;; Code: | 38 | ;;; Code: |
| 33 | 39 | ||
| 34 | (require 'electric) | 40 | (require 'electric) |
| @@ -71,11 +77,15 @@ | |||
| 71 | 77 | ||
| 72 | ;;;###autoload | 78 | ;;;###autoload |
| 73 | (defun with-electric-help (thunk &optional buffer noerase) | 79 | (defun with-electric-help (thunk &optional buffer noerase) |
| 74 | "Arguments are THUNK &optional BUFFER NOERASE. BUFFER defaults to `*Help*'. | 80 | "Pop up an \"electric\" help buffer. |
| 81 | Arguments are THUNK &optional BUFFER NOERASE. BUFFER defaults to `*Help*'. | ||
| 75 | THUNK is a function of no arguments which is called to initialize | 82 | THUNK is a function of no arguments which is called to initialize |
| 76 | the contents of BUFFER. BUFFER will be erased before THUNK is called unless | 83 | the contents of BUFFER. BUFFER will be erased before THUNK is called unless |
| 77 | NOERASE is non-nil. THUNK will be called with `standard-output' bound to | 84 | NOERASE is non-nil. THUNK will be called with `standard-output' bound to |
| 78 | the buffer specified by BUFFER | 85 | the buffer specified by BUFFER. |
| 86 | |||
| 87 | If THUNK returns nil, we display BUFFER starting at the top, and | ||
| 88 | shrink the window to fit. If THUNK returns non-nil, we don't do those things. | ||
| 79 | 89 | ||
| 80 | After THUNK has been called, this function \"electrically\" pops up a window | 90 | After THUNK has been called, this function \"electrically\" pops up a window |
| 81 | in which BUFFER is displayed and allows the user to scroll through that buffer | 91 | in which BUFFER is displayed and allows the user to scroll through that buffer |
| @@ -323,8 +333,6 @@ will select it.)" | |||
| 323 | (setq ehelp-map map) | 333 | (setq ehelp-map map) |
| 324 | (fset 'ehelp-command map))) | 334 | (fset 'ehelp-command map))) |
| 325 | 335 | ||
| 326 | ;; Do (define-key global-map "\C-h" 'ehelp-command) if you want to win | ||
| 327 | |||
| 328 | (provide 'ehelp) | 336 | (provide 'ehelp) |
| 329 | 337 | ||
| 330 | ;;; ehelp.el ends here | 338 | ;;; ehelp.el ends here |