diff options
| -rw-r--r-- | lisp/chistory.el | 20 |
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." | |||
| 125 | (error "No command history") | 125 | (error "No command history") |
| 126 | (command-history-mode))))) | 126 | (command-history-mode))))) |
| 127 | 127 | ||
| 128 | (defvar command-history-map nil) | ||
| 129 | (unless command-history-map | ||
| 130 | (setq command-history-map (make-sparse-keymap)) | ||
| 131 | (set-keymap-parent command-history-map lisp-mode-shared-map) | ||
| 132 | (suppress-keymap command-history-map) | ||
| 133 | (define-key command-history-map "x" 'command-history-repeat) | ||
| 134 | (define-key command-history-map "\n" 'next-line) | ||
| 135 | (define-key command-history-map "\r" 'next-line) | ||
| 136 | (define-key command-history-map "\177" 'previous-line)) | ||
| 137 | |||
| 128 | (defun command-history-mode () | 138 | (defun command-history-mode () |
| 129 | "Major mode for listing and repeating recent commands. | 139 | "Major mode for listing and repeating recent commands. |
| 130 | 140 | ||
| @@ -149,16 +159,6 @@ Keybindings: | |||
| 149 | :type 'hook | 159 | :type 'hook |
| 150 | :group 'chistory) | 160 | :group 'chistory) |
| 151 | 161 | ||
| 152 | (defvar command-history-map nil) | ||
| 153 | (unless command-history-map | ||
| 154 | (setq command-history-map (make-sparse-keymap)) | ||
| 155 | (set-keymap-parent command-history-map lisp-mode-shared-map) | ||
| 156 | (suppress-keymap command-history-map) | ||
| 157 | (define-key command-history-map "x" 'command-history-repeat) | ||
| 158 | (define-key command-history-map "\n" 'next-line) | ||
| 159 | (define-key command-history-map "\r" 'next-line) | ||
| 160 | (define-key command-history-map "\177" 'previous-line)) | ||
| 161 | |||
| 162 | (defun command-history-repeat () | 162 | (defun command-history-repeat () |
| 163 | "Repeat the command shown on the current line. | 163 | "Repeat the command shown on the current line. |
| 164 | The buffer for that command is the previous current buffer." | 164 | The buffer for that command is the previous current buffer." |