summaryrefslogtreecommitdiff
path: root/lisp/ehelp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-07-30 07:04:58 +0000
committerRichard M. Stallman <rms@gnu.org>1995-07-30 07:04:58 +0000
commitbbe2ecf64b3c3540a66c5bee81ad4a20c93fd6ff (patch)
tree18cdd5d2b0558518fc5665e41fbb66d0997a0fff /lisp/ehelp.el
parent639f52d85873d09bc1b0e53ab55dbaf25c4299f2 (diff)
downloademacs-bbe2ecf64b3c3540a66c5bee81ad4a20c93fd6ff.tar.gz
(with-electric-help): Doc fix.
Diffstat (limited to 'lisp/ehelp.el')
-rw-r--r--lisp/ehelp.el16
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 @@
;; function that generates the actual text of the help into the current
;; buffer.
+;; To make this the default, you must do
+;; (require 'ehelp)
+;; (define-key global-map "\C-h" 'ehelp-command)
+;; (define-key global-map [help] 'ehelp-command)
+;; (define-key global-map [f1] 'ehelp-command)
+
;;; Code:
(require 'electric)
@@ -71,11 +77,15 @@
;;;###autoload
(defun with-electric-help (thunk &optional buffer noerase)
- "Arguments are THUNK &optional BUFFER NOERASE. BUFFER defaults to `*Help*'.
+ "Pop up an \"electric\" help buffer.
+Arguments are THUNK &optional BUFFER NOERASE. BUFFER defaults to `*Help*'.
THUNK is a function of no arguments which is called to initialize
the contents of BUFFER. BUFFER will be erased before THUNK is called unless
NOERASE is non-nil. THUNK will be called with `standard-output' bound to
-the buffer specified by BUFFER
+the buffer specified by BUFFER.
+
+If THUNK returns nil, we display BUFFER starting at the top, and
+shrink the window to fit. If THUNK returns non-nil, we don't do those things.
After THUNK has been called, this function \"electrically\" pops up a window
in which BUFFER is displayed and allows the user to scroll through that buffer
@@ -323,8 +333,6 @@ will select it.)"
(setq ehelp-map map)
(fset 'ehelp-command map)))
-;; Do (define-key global-map "\C-h" 'ehelp-command) if you want to win
-
(provide 'ehelp)
;;; ehelp.el ends here