]> code.delx.au - gnu-emacs/blobdiff - lisp/chistory.el
Fix up comment convention on the arch-tag lines.
[gnu-emacs] / lisp / chistory.el
index 56fef3712e0a9b400d358bc72b6b451c99c6ef11..6b5d2c7d282a75ec9728b483da7b29321875d9b8 100644 (file)
@@ -1,6 +1,7 @@
 ;;; chistory.el --- list command history
 
-;; Copyright (C) 1985 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
+;;   2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
 ;; Maintainer: FSF
@@ -10,7 +11,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -20,8 +21,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,13 +126,27 @@ 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")
   (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)
@@ -145,16 +160,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."
@@ -187,4 +192,5 @@ and runs the normal hook `command-history-hook'."
 
 (provide 'chistory)
 
+;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd
 ;;; chistory.el ends here