X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/307645975cf9964740f4de544718f3f344a0c99c..787caf990afc3db2522f3985ae89857318641b3b:/lisp/chistory.el diff --git a/lisp/chistory.el b/lisp/chistory.el index 56fef3712e..8b9c639404 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -125,8 +125,22 @@ 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." + "Major mode for listing and repeating recent commands. + +Keybindings: +\\{command-history-map}" + (interactive) (Command-history-setup) (setq major-mode 'command-history-mode) (setq mode-name "Command History") @@ -145,16 +159,6 @@ The buffer is left in Command History mode." :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."