summaryrefslogtreecommitdiff
path: root/lisp/chistory.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-12-21 20:18:51 +0000
committerRichard M. Stallman <rms@gnu.org>2002-12-21 20:18:51 +0000
commitea88efd7b2ab624fe9d2a8f9a34686f392ec8cbe (patch)
tree6ae7154747e3eefe6e19647da5bb0d35aa5ff137 /lisp/chistory.el
parentc024cbb5df5596f204b55416822d58abfc93297f (diff)
downloademacs-ea88efd7b2ab624fe9d2a8f9a34686f392ec8cbe.tar.gz
(command-history-map): Move definition up.
Diffstat (limited to 'lisp/chistory.el')
-rw-r--r--lisp/chistory.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/chistory.el b/lisp/chistory.el
index aae1d728ee7..8b9c6394046 100644
--- a/lisp/chistory.el
+++ b/lisp/chistory.el
@@ -125,6 +125,16 @@ The buffer is left in Command History mode."
(error "No command history")
(command-history-mode)))))
+(defvar command-history-map nil)
+(unless command-history-map
+ (setq command-history-map (make-sparse-keymap))
+ (set-keymap-parent command-history-map lisp-mode-shared-map)
+ (suppress-keymap command-history-map)
+ (define-key command-history-map "x" 'command-history-repeat)
+ (define-key command-history-map "\n" 'next-line)
+ (define-key command-history-map "\r" 'next-line)
+ (define-key command-history-map "\177" 'previous-line))
+
(defun command-history-mode ()
"Major mode for listing and repeating recent commands.
@@ -149,16 +159,6 @@ Keybindings:
:type 'hook
:group 'chistory)
-(defvar command-history-map nil)
-(unless command-history-map
- (setq command-history-map (make-sparse-keymap))
- (set-keymap-parent command-history-map lisp-mode-shared-map)
- (suppress-keymap command-history-map)
- (define-key command-history-map "x" 'command-history-repeat)
- (define-key command-history-map "\n" 'next-line)
- (define-key command-history-map "\r" 'next-line)
- (define-key command-history-map "\177" 'previous-line))
-
(defun command-history-repeat ()
"Repeat the command shown on the current line.
The buffer for that command is the previous current buffer."