X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4ba1612761c358928e641522c4f52cb91ffaaf48..03da5d089a8ed035cec443a27259e7d21487a22e:/lisp/chistory.el diff --git a/lisp/chistory.el b/lisp/chistory.el index aae1d728ee..c05fd849db 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -1,6 +1,6 @@ ;;; chistory.el --- list command history -;; Copyright (C) 1985 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -125,6 +125,16 @@ 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. @@ -135,7 +145,7 @@ Keybindings: (setq major-mode 'command-history-mode) (setq mode-name "Command History") (use-local-map command-history-map) - (run-hooks 'command-history-mode-hook)) + (run-mode-hooks 'command-history-mode-hook)) (defun Command-history-setup () (kill-all-local-variables) @@ -149,16 +159,6 @@ Keybindings: :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." @@ -191,4 +191,5 @@ and runs the normal hook `command-history-hook'." (provide 'chistory) +;;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd ;;; chistory.el ends here