;; Author: K. Shane Hartman
;; Maintainer: FSF
+;; Keywords: convenience
;; This file is part of GNU Emacs.
(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")
(defun Command-history-setup ()
(kill-all-local-variables)
- (use-local-map (or keymap command-history-map))
+ (use-local-map command-history-map)
(lisp-mode-variables nil)
(set-syntax-table emacs-lisp-mode-syntax-table)
(setq buffer-read-only t))
: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."
(provide 'chistory)
+;;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd
;;; chistory.el ends here