aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-11-20 16:57:30 +0000
committerJuanma Barranquero2008-11-20 16:57:30 +0000
commit3fd29551d07924e67e9610572abcae4cb528803a (patch)
tree409605fa0e0779f7ccf67ef4ecd4fabcc3f2423c
parent31e02fabc0e1c2e44fcf2f6bbf3a390ceece3e5a (diff)
downloademacs-3fd29551d07924e67e9610572abcae4cb528803a.tar.gz
emacs-3fd29551d07924e67e9610572abcae4cb528803a.zip
* ehelp.el (electric-help-map, ehelp-map): Define within defvar.
(with-electric-help): Fix typo and reflow docstring.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/ehelp.el29
2 files changed, 17 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 421c2a20680..25dec578989 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-11-20 Juanma Barranquero <lekktu@gmail.com>
2
3 * ehelp.el (electric-help-map, ehelp-map): Define within defvar.
4 (with-electric-help): Fix typo and reflow docstring.
5
12008-11-20 Stefan Monnier <monnier@iro.umontreal.ca> 62008-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * buff-menu.el (Buffer-menu-short-ellipsis): New constant. 8 * buff-menu.el (Buffer-menu-short-ellipsis): New constant.
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index a9b3a589eaa..5828eefbca4 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -38,8 +38,6 @@
38;;; Code: 38;;; Code:
39 39
40(require 'electric) 40(require 'electric)
41(defvar electric-help-map ()
42 "Keymap defining commands available in `electric-help-mode'.")
43 41
44(defvar electric-help-form-to-execute nil) 42(defvar electric-help-form-to-execute nil)
45 43
@@ -59,8 +57,8 @@
59 :group 'electric-help) 57 :group 'electric-help)
60 58
61(put 'electric-help-undefined 'suppress-keymap t) 59(put 'electric-help-undefined 'suppress-keymap t)
62(if electric-help-map 60
63 () 61(defvar electric-help-map
64 (let ((map (make-keymap))) 62 (let ((map (make-keymap)))
65 ;; allow all non-self-inserting keys - search, scroll, etc, but 63 ;; allow all non-self-inserting keys - search, scroll, etc, but
66 ;; let M-x and C-x exit ehelp mode and retain buffer: 64 ;; let M-x and C-x exit ehelp mode and retain buffer:
@@ -91,8 +89,8 @@
91 (define-key map "r" 'electric-help-retain) 89 (define-key map "r" 'electric-help-retain)
92 (define-key map "\ex" 'electric-help-execute-extended) 90 (define-key map "\ex" 'electric-help-execute-extended)
93 (define-key map "\C-x" 'electric-help-ctrl-x-prefix) 91 (define-key map "\C-x" 'electric-help-ctrl-x-prefix)
94 92 map)
95 (setq electric-help-map map))) 93 "Keymap defining commands available in `electric-help-mode'.")
96 94
97(defun electric-help-mode () 95(defun electric-help-mode ()
98 "`with-electric-help' temporarily places its buffer in this mode. 96 "`with-electric-help' temporarily places its buffer in this mode.
@@ -117,13 +115,13 @@ erased before THUNK is called unless NOERASE is non-nil. THUNK will
117be called while BUFFER is current and with `standard-output' bound to 115be called while BUFFER is current and with `standard-output' bound to
118the buffer specified by BUFFER. 116the buffer specified by BUFFER.
119 117
120If THUNK returns nil, we display BUFFER starting at the top, and 118If THUNK returns nil, we display BUFFER starting at the top, and shrink
121shrink the window to fit. If THUNK returns non-nil, we don't do those things. 119the window to fit. If THUNK returns non-nil, we don't do those things.
122 120
123After THUNK has been called, this function \"electrically\" pops up a window 121After THUNK has been called, this function \"electrically\" pops up a
124in which BUFFER is displayed and allows the user to scroll through that buffer 122window in which BUFFER is displayed and allows the user to scroll
125in `electric-help-mode'. The window's height will be at least MINHEIGHT if 123through that buffer in `electric-help-mode'. The window's height will
126this value is non-nil. 124be at least MINHEIGHT if this value is non-nil.
127 125
128If THUNK returns nil, we display BUFFER starting at the top, and 126If THUNK returns nil, we display BUFFER starting at the top, and
129shrink the window to fit if `electric-help-shrink-window' is non-nil. 127shrink the window to fit if `electric-help-shrink-window' is non-nil.
@@ -402,9 +400,7 @@ will select it.)"
402 400
403;;;; ehelp-map 401;;;; ehelp-map
404 402
405(defvar ehelp-map ()) 403(defvar ehelp-map
406(if ehelp-map
407 nil
408 (let ((map (copy-keymap help-map))) 404 (let ((map (copy-keymap help-map)))
409 (substitute-key-definition 'apropos 'electric-apropos map) 405 (substitute-key-definition 'apropos 'electric-apropos map)
410 (substitute-key-definition 'command-apropos 'electric-command-apropos map) 406 (substitute-key-definition 'command-apropos 'electric-command-apropos map)
@@ -415,8 +411,7 @@ will select it.)"
415 (substitute-key-definition 'describe-variable 'electric-describe-variable map) 411 (substitute-key-definition 'describe-variable 'electric-describe-variable map)
416 (substitute-key-definition 'describe-bindings 'electric-describe-bindings map) 412 (substitute-key-definition 'describe-bindings 'electric-describe-bindings map)
417 (substitute-key-definition 'describe-syntax 'electric-describe-syntax map) 413 (substitute-key-definition 'describe-syntax 'electric-describe-syntax map)
418 414 map))
419 (setq ehelp-map map)))
420 415
421;;;###(autoload 'ehelp-command "ehelp" "Prefix command for ehelp." t 'keymap) 416;;;###(autoload 'ehelp-command "ehelp" "Prefix command for ehelp." t 'keymap)
422(defalias 'ehelp-command ehelp-map) 417(defalias 'ehelp-command ehelp-map)