summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/copyright.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-01-22 14:18:01 -0800
committerGlenn Morris <rgm@gnu.org>2011-01-22 14:18:01 -0800
commit572bf6f254ce23f9ce06584b88c12f07e776c1c9 (patch)
treee6c94a51bfe5593358941434055034dbbd582122 /lisp/emacs-lisp/copyright.el
parentd226ec23ec9d6fe1c4b9cb1d9b0520a3b402057e (diff)
downloademacs-572bf6f254ce23f9ce06584b88c12f07e776c1c9.tar.gz
emacs-572bf6f254ce23f9ce06584b88c12f07e776c1c9.tar.bz2
emacs-572bf6f254ce23f9ce06584b88c12f07e776c1c9.zip
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.
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
-rw-r--r--lisp/emacs-lisp/copyright.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index a6a545ac57b..b59f838233a 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -125,6 +125,8 @@ When this is `function', only ask when called non-interactively."
"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 @@ interactively."
(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 @@ interactively."
"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))))