(auto-mode-alist): Add .p and .pas for pascal-mode.
[bpt/emacs.git] / lisp / chistory.el
index 3a8bcb6..64fe7c8 100644 (file)
@@ -1,12 +1,15 @@
-;; chistory -- List command history
+;;; chistory.el --- list command history
+
 ;; Copyright (C) 1985 Free Software Foundation, Inc.
-;; Principal author K. Shane Hartman
+
+;; Author: K. Shane Hartman
+;; Maintainer: FSF
 
 ;; This file is part of GNU Emacs.
 
 ;; 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 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
-
-(provide 'chistory)
+;;; Commentary:
 
 ;; This really has nothing to do with list-command-history per se, but
 ;; its a nice alternative to C-x ESC (repeat-complex-command) and
 ;; functions as a lister if given no pattern.  It's not important
 ;; enough to warrant a file of its own.
 
+;;; Code:
+
 ;;;###autoload
 (defun repeat-matching-complex-command (&optional pattern)
   "Edit and re-evaluate complex command with name matching PATTERN.
@@ -147,7 +151,7 @@ The buffer for that command is the previous current buffer."
                (beginning-of-line)
                (read (current-buffer)))
            (set-buffer
-            (cdr (buffer-list)))))))
+            (car (cdr (buffer-list))))))))
 
 ;;;###autoload
 (defun command-history-mode ()
@@ -165,3 +169,7 @@ The Command History listing is recomputed each time this mode is invoked."
   (list-command-history)
   (pop-to-buffer "*Command History*")
   (run-hooks 'command-history-hook))
+
+(provide 'chistory)
+
+;;; chistory.el ends here