125 |
(error "No command history") |
(error "No command history") |
126 |
(command-history-mode))))) |
(command-history-mode))))) |
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 |
|
|
138 |
(defun command-history-mode () |
(defun command-history-mode () |
139 |
"Major mode for listing and repeating recent commands." |
"Major mode for listing and repeating recent commands. |
140 |
|
|
141 |
|
Keybindings: |
142 |
|
\\{command-history-map}" |
143 |
|
(interactive) |
144 |
(Command-history-setup) |
(Command-history-setup) |
145 |
(setq major-mode 'command-history-mode) |
(setq major-mode 'command-history-mode) |
146 |
(setq mode-name "Command History") |
(setq mode-name "Command History") |
159 |
:type 'hook |
:type 'hook |
160 |
:group 'chistory) |
:group 'chistory) |
161 |
|
|
|
(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)) |
|
|
|
|
162 |
(defun command-history-repeat () |
(defun command-history-repeat () |
163 |
"Repeat the command shown on the current line. |
"Repeat the command shown on the current line. |
164 |
The buffer for that command is the previous current buffer." |
The buffer for that command is the previous current buffer." |