Comment changes.
[bpt/emacs.git] / lisp / emacs-lisp / copyright.el
index 7f33a7e..8527c68 100644 (file)
@@ -1,11 +1,12 @@
 ;;; upd-copyr.el --- update the copyright notice in a GNU Emacs Lisp file
 
+;;; Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+
 ;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
-;; Last-Modified: 03 Jun 1991
 ;; Keywords: maint
 
-;;; Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-;;;
+;;; This file is part of GNU Emacs.
+
 ;;; This program 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)
@@ -47,7 +48,7 @@ If `replace-copying-with' is set, the copying permissions following the
 copyright are replaced as well.
 
 If optional third argument ASK is non-nil, the user is prompted for whether
-or not to update the copyright.  If optional third argument ASK-YEAR is
+or not to update the copyright.  If optional fourth argument ASK-YEAR is
 non-nil, the user is prompted for whether or not to replace the year rather
 than adding to it."
   (interactive "*P")
@@ -55,9 +56,11 @@ than adding to it."
     (save-restriction
       (widen)
       (goto-char (point-min))
-      ;; Handle abbreviated year lists like "1800, 01, 02, 03".
-      (if (re-search-forward (concat (substring current-year 0 2)
-                                    "\\([0-9][0-9]\\(,\\s \\)+\\)*"
+      ;; Handle abbreviated year lists like "1800, 01, 02, 03"
+      ;; or "1900, '01, '02, '03".
+      (if (re-search-forward (concat "\\(" (substring current-year 0 2)
+                                    "\\)?"
+                                    "\\([0-9][0-9]\\(,\\s \\)+\\)*'?"
                                     (substring current-year 2))
                             nil t)
          (or ask-upd
@@ -71,7 +74,7 @@ than adding to it."
                         (search-forward "is free software" nil t)
                       (goto-char (point-min))))
                 (re-search-forward
-                 "[Cc]opyright[^0-9]*\\(\\([-, \t]*\\([0-9]+\\)\\)\\)+"
+                 "[Cc]opyright[^0-9]*\\(\\(\\([-, \t]*\\([0-9]+\\)\\)\\)+\\)"
                  nil t)
                 (or (not ask-upd)
                     (save-window-excursion
@@ -117,6 +120,9 @@ than adding to it."
                          (princ (substitute-command-keys "\
 I don't know where the copying notice begins.
 Put point there and hit \\[exit-recursive-edit]."))
+                         (save-excursion
+                           (set-buffer standard-output)
+                           (help-mode))
                          (recursive-edit)))
                      (setq beg (point))
                      (or (search-forward "02139, USA." nil t)
@@ -124,6 +130,9 @@ Put point there and hit \\[exit-recursive-edit]."))
                            (princ (substitute-command-keys "\
 I don't know where the copying notice ends.
 Put point there and hit \\[exit-recursive-edit]."))
+                           (save-excursion
+                             (set-buffer standard-output)
+                             (help-mode))
                            (recursive-edit)))
                      (delete-region beg (point))))
                (insert-file replace-copying-with))