mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
(command-history-map): Move definition up.
This commit is contained in:
parent
645a103873
commit
ba3ca9bc9d
1 changed files with 10 additions and 10 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Reference in a new issue