summaryrefslogtreecommitdiff
path: root/lisp/ehelp.el
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1991-02-28 21:40:18 +0000
committerJim Blandy <jimb@redhat.com>1991-02-28 21:40:18 +0000
commit6d2f728ed0ae4ac6dc6f40002862fad5c110ca57 (patch)
treed4de6cd25a70efe29f31ecfe4a89d4b93dd82c44 /lisp/ehelp.el
parent7d017db9b45551bb35f00d044505ca943e1819bf (diff)
downloademacs-6d2f728ed0ae4ac6dc6f40002862fad5c110ca57.tar.gz
*** empty log message ***
Diffstat (limited to 'lisp/ehelp.el')
-rw-r--r--lisp/ehelp.el44
1 files changed, 12 insertions, 32 deletions
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index 37cd37944c1..9755bf07b7c 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -20,8 +20,7 @@
(provide 'ehelp)
(defvar electric-help-map ()
- "Keymap defining commands available whilst scrolling
-through a buffer in electric-help-mode")
+ "Keymap defining commands available in `electric-help-mode'.")
(put 'electric-help-undefined 'suppress-keymap t)
(if electric-help-map
@@ -45,8 +44,8 @@ through a buffer in electric-help-mode")
(setq electric-help-map map)))
(defun electric-help-mode ()
- "with-electric-help temporarily places its buffer in this mode
-\(On exit from with-electric-help, the buffer is put in default-major-mode)"
+ "`with-electric-help' temporarily places its buffer in this mode.
+\(On exit from `with-electric-help', the buffer is put in `default-major-mode'.)"
(setq buffer-read-only t)
(setq mode-name "Help")
(setq major-mode 'help)
@@ -57,19 +56,18 @@ through a buffer in electric-help-mode")
)
(defun with-electric-help (thunk &optional buffer noerase)
- "Arguments are THUNK &optional BUFFER NOERASE.
-BUFFER defaults to \"*Help*\"
-THUNK is a function of no arguments which is called to initialise
- 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
+ "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
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
in electric-help-mode.
-When the user exits (with electric-help-exit, or otherwise) the help
-buffer's window disappears (ie we use save-window-excursion)
-BUFFER is put into default-major-mode (or fundamental-mode) when we exit"
+When the user exits (with `electric-help-exit', or otherwise) the help
+buffer's window disappears (i.e., we use `save-window-excursion')
+BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit"
(setq buffer (get-buffer-create (or buffer "*Help*")))
(let ((one (one-window-p t))
(config (current-window-configuration))
@@ -166,29 +164,13 @@ BUFFER is put into default-major-mode (or fundamental-mode) when we exit"
(throw 'exit t))
(defun electric-help-retain ()
- "Exit electric-help, retaining the current window/buffer conifiguration.
+ "Exit `electric-help', retaining the current window/buffer configuration.
\(The *Help* buffer will not be selected, but \\[switch-to-buffer-other-window] RET
will select it.)"
(interactive)
(throw 'exit '(retain)))
-;(defun electric-help-undefined ()
-; (interactive)
-; (let* ((keys (this-command-keys))
-; (n (length keys)))
-; (if (or (= n 1)
-; (and (= n 2)
-; meta-flag
-; (eq (aref keys 0) meta-prefix-char)))
-; (setq unread-command-char last-input-char
-; current-prefix-arg prefix-arg)
-; ;;>>> I don't care.
-; ;;>>> The emacs command-loop is too much pure pain to
-; ;;>>> duplicate
-; ))
-; (throw 'exit t))
-
(defun electric-help-undefined ()
(interactive)
(error "%s is undefined -- Press %s to exit"
@@ -304,7 +286,6 @@ will select it.)"
;(define-key help-map "a" 'electric-command-apropos)
-
;;;; ehelp-map
@@ -324,4 +305,3 @@ will select it.)"
(fset 'ehelp-command map)))
;; Do (define-key global-map "\C-h" 'ehelp-command) if you want to win
-