emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102947: Tweak previous copyright.el


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102947: Tweak previous copyright.el change.
Date: Sat, 22 Jan 2011 14:18:01 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102947
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2011-01-22 14:18:01 -0800
message:
  Tweak previous copyright.el change.
  
  * lisp/emacs-lisp/copyright.el (copyright-find-copyright)
  (copyright-update, copyright-fix-years):
  Do the initial widen and move in copyright-find-copyright.
modified:
  lisp/emacs-lisp/copyright.el
=== modified file 'lisp/emacs-lisp/copyright.el'
--- a/lisp/emacs-lisp/copyright.el      2011-01-22 22:13:17 +0000
+++ b/lisp/emacs-lisp/copyright.el      2011-01-22 22:18:01 +0000
@@ -125,6 +125,8 @@
   "Return non-nil if a copyright header suitable for updating is found.
 The header must match `copyright-regexp' and `copyright-names-regexp', if set.
 This function sets the match-data that `copyright-update-year' uses."
+  (widen)
+  (goto-char (copyright-start-point))
   (condition-case err
       ;; (1) Need the extra \\( \\) around copyright-regexp because we
       ;; goto (match-end 1) below. See note (2) below.
@@ -214,8 +216,6 @@
                       (and (eq copyright-query 'function) interactivep))))
       (save-excursion
        (save-restriction
-         (widen)
-         (goto-char (copyright-start-point))
          ;; If names-regexp doesn't match, we should not mess with
          ;; the years _or_ the GPL version.
          (when (copyright-find-copyright)
@@ -253,8 +253,6 @@
   "Convert 2 digit years to 4 digit years.
 Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
   (interactive)
-  (widen)
-  (goto-char (copyright-start-point))
   (if (copyright-find-copyright)
       (let ((s (match-beginning 2))
            (e (copy-marker (1+ (match-end 2))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]