summaryrefslogtreecommitdiff
path: root/lisp/echistory.el
diff options
context:
space:
mode:
authorJohn Paul Wallington <jpw@pobox.com>2008-06-04 11:22:53 +0000
committerJohn Paul Wallington <jpw@pobox.com>2008-06-04 11:22:53 +0000
commita0de8967f4ff23092a353ea800bc0ef0747d679f (patch)
tree87a8891839744d597c4635ac6a6978445bd952d6 /lisp/echistory.el
parent12de509923ddb43fb7d3504694f86414f7429cec (diff)
downloademacs-a0de8967f4ff23092a353ea800bc0ef0747d679f.tar.gz
(electric-history-map): Define within defvar. Add docstring.
Diffstat (limited to 'lisp/echistory.el')
-rw-r--r--lisp/echistory.el84
1 files changed, 42 insertions, 42 deletions
diff --git a/lisp/echistory.el b/lisp/echistory.el
index abe40a658c6..42647192319 100644
--- a/lisp/echistory.el
+++ b/lisp/echistory.el
@@ -41,48 +41,48 @@ With prefix arg NOCONFIRM, execute current line as-is without editing."
(if (boundp 'electric-history-in-progress)
(if todo (throw 'electric-history-quit (list noconfirm todo)))))))
-(defvar electric-history-map ())
-(if electric-history-map
- ()
- (setq electric-history-map (make-sparse-keymap))
- (define-key electric-history-map [t] 'Electric-history-undefined)
- (define-key electric-history-map "\e" (make-sparse-keymap))
- (define-key electric-history-map [?\e t] 'Electric-history-undefined)
- (define-key electric-history-map "\C-u" 'universal-argument)
- (define-key electric-history-map " " 'Electric-command-history-redo-expression)
- (define-key electric-history-map "!" 'Electric-command-history-redo-expression)
- (define-key electric-history-map "\e\C-x" 'eval-sexp)
- (define-key electric-history-map "\e\C-d" 'down-list)
- (define-key electric-history-map "\e\C-u" 'backward-up-list)
- (define-key electric-history-map "\e\C-b" 'backward-sexp)
- (define-key electric-history-map "\e\C-f" 'forward-sexp)
- (define-key electric-history-map "\e\C-a" 'beginning-of-defun)
- (define-key electric-history-map "\e\C-e" 'end-of-defun)
- (define-key electric-history-map "\e\C-n" 'forward-list)
- (define-key electric-history-map "\e\C-p" 'backward-list)
- (define-key electric-history-map "q" 'Electric-history-quit)
- (define-key electric-history-map "\C-c" nil)
- (define-key electric-history-map "\C-c\C-c" 'Electric-history-quit)
- (define-key electric-history-map "\C-]" 'Electric-history-quit)
- (define-key electric-history-map "\C-z" 'suspend-frame)
- (define-key electric-history-map (char-to-string help-char) 'Helper-help)
- (define-key electric-history-map "?" 'Helper-describe-bindings)
- (define-key electric-history-map "\e>" 'end-of-buffer)
- (define-key electric-history-map "\e<" 'beginning-of-buffer)
- (define-key electric-history-map "\n" 'next-line)
- (define-key electric-history-map "\r" 'next-line)
- (define-key electric-history-map "\177" 'previous-line)
- (define-key electric-history-map "\C-n" 'next-line)
- (define-key electric-history-map "\C-p" 'previous-line)
- (define-key electric-history-map "\ev" 'scroll-down)
- (define-key electric-history-map "\C-v" 'scroll-up)
- (define-key electric-history-map [home] 'beginning-of-buffer)
- (define-key electric-history-map [down] 'next-line)
- (define-key electric-history-map [up] 'previous-line)
- (define-key electric-history-map [prior] 'scroll-down)
- (define-key electric-history-map [next] 'scroll-up)
- (define-key electric-history-map "\C-l" 'recenter)
- (define-key electric-history-map "\e\C-v" 'scroll-other-window))
+(defvar electric-history-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map [t] 'Electric-history-undefined)
+ (define-key map "\e" (make-sparse-keymap))
+ (define-key map [?\e t] 'Electric-history-undefined)
+ (define-key map "\C-u" 'universal-argument)
+ (define-key map " " 'Electric-command-history-redo-expression)
+ (define-key map "!" 'Electric-command-history-redo-expression)
+ (define-key map "\e\C-x" 'eval-sexp)
+ (define-key map "\e\C-d" 'down-list)
+ (define-key map "\e\C-u" 'backward-up-list)
+ (define-key map "\e\C-b" 'backward-sexp)
+ (define-key map "\e\C-f" 'forward-sexp)
+ (define-key map "\e\C-a" 'beginning-of-defun)
+ (define-key map "\e\C-e" 'end-of-defun)
+ (define-key map "\e\C-n" 'forward-list)
+ (define-key map "\e\C-p" 'backward-list)
+ (define-key map "q" 'Electric-history-quit)
+ (define-key map "\C-c" nil)
+ (define-key map "\C-c\C-c" 'Electric-history-quit)
+ (define-key map "\C-]" 'Electric-history-quit)
+ (define-key map "\C-z" 'suspend-frame)
+ (define-key map (char-to-string help-char) 'Helper-help)
+ (define-key map "?" 'Helper-describe-bindings)
+ (define-key map "\e>" 'end-of-buffer)
+ (define-key map "\e<" 'beginning-of-buffer)
+ (define-key map "\n" 'next-line)
+ (define-key map "\r" 'next-line)
+ (define-key map "\177" 'previous-line)
+ (define-key map "\C-n" 'next-line)
+ (define-key map "\C-p" 'previous-line)
+ (define-key map "\ev" 'scroll-down)
+ (define-key map "\C-v" 'scroll-up)
+ (define-key map [home] 'beginning-of-buffer)
+ (define-key map [down] 'next-line)
+ (define-key map [up] 'previous-line)
+ (define-key map [prior] 'scroll-down)
+ (define-key map [next] 'scroll-up)
+ (define-key map "\C-l" 'recenter)
+ (define-key map "\e\C-v" 'scroll-other-window)
+ map)
+ "Keymap for Electric Command History mode.")
(defvar electric-command-history-hook nil
"If non-nil, its value is called by `electric-command-history'.")