]> code.delx.au - gnu-emacs/blobdiff - lisp/chistory.el
(reset-language-environment): Set
[gnu-emacs] / lisp / chistory.el
index 56fef3712e0a9b400d358bc72b6b451c99c6ef11..8b9c63940465c18f99797a53f6a2af768f699209 100644 (file)
@@ -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."