aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ehelp.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index 9b35298c296..80242ff2b03 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -113,7 +113,6 @@
113;;;###autoload 113;;;###autoload
114(defun with-electric-help (thunk &optional buffer noerase minheight) 114(defun with-electric-help (thunk &optional buffer noerase minheight)
115 "Pop up an \"electric\" help buffer. 115 "Pop up an \"electric\" help buffer.
116The arguments are THUNK &optional BUFFER NOERASE MINHEIGHT.
117THUNK is a function of no arguments which is called to initialize the 116THUNK is a function of no arguments which is called to initialize the
118contents of BUFFER. BUFFER defaults to `*Help*'. BUFFER will be 117contents of BUFFER. BUFFER defaults to `*Help*'. BUFFER will be
119erased before THUNK is called unless NOERASE is non-nil. THUNK will 118erased before THUNK is called unless NOERASE is non-nil. THUNK will
@@ -125,7 +124,7 @@ shrink the window to fit. If THUNK returns non-nil, we don't do those things.
125 124
126After THUNK has been called, this function \"electrically\" pops up a window 125After THUNK has been called, this function \"electrically\" pops up a window
127in which BUFFER is displayed and allows the user to scroll through that buffer 126in which BUFFER is displayed and allows the user to scroll through that buffer
128in electric-help-mode. The window's height will be at least MINHEIGHT if 127in `electric-help-mode'. The window's height will be at least MINHEIGHT if
129this value is non-nil. 128this value is non-nil.
130 129
131If THUNK returns nil, we display BUFFER starting at the top, and 130If THUNK returns nil, we display BUFFER starting at the top, and
@@ -134,7 +133,7 @@ If THUNK returns non-nil, we don't do those things.
134 133
135When the user exits (with `electric-help-exit', or otherwise), the help 134When the user exits (with `electric-help-exit', or otherwise), the help
136buffer's window disappears (i.e., we use `save-window-excursion'), and 135buffer's window disappears (i.e., we use `save-window-excursion'), and
137BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit." 136BUFFER is put into `default-major-mode' (or `fundamental-mode')."
138 (setq buffer (get-buffer-create (or buffer "*Help*"))) 137 (setq buffer (get-buffer-create (or buffer "*Help*")))
139 (let ((one (one-window-p t)) 138 (let ((one (one-window-p t))
140 (config (current-window-configuration)) 139 (config (current-window-configuration))
@@ -246,7 +245,7 @@ BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit."
246; (scroll-up arg))) 245; (scroll-up arg)))
247 246
248(defun electric-help-exit () 247(defun electric-help-exit ()
249 "Exit `electric-help', restoring the previous window/buffer configuration. 248 "Exit `with-electric-help', restoring the previous window/buffer configuration.
250\(The *Help* buffer will be buried.)" 249\(The *Help* buffer will be buried.)"
251 (interactive) 250 (interactive)
252 ;; Make sure that we don't throw twice, even if two events cause 251 ;; Make sure that we don't throw twice, even if two events cause
@@ -257,7 +256,7 @@ BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit."
257 (throw 'exit t)))) 256 (throw 'exit t))))
258 257
259(defun electric-help-retain () 258(defun electric-help-retain ()
260 "Exit `electric-help', retaining the current window/buffer configuration. 259 "Exit `with-electric-help', retaining the current window/buffer configuration.
261\(The *Help* buffer will not be selected, but \\[switch-to-buffer-other-window] RET 260\(The *Help* buffer will not be selected, but \\[switch-to-buffer-other-window] RET
262will select it.)" 261will select it.)"
263 (interactive) 262 (interactive)