diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2013-09-26 10:37:16 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2013-09-26 10:37:16 +0300 |
| commit | b87c4ff2817e71ca71b028792200b1e069a95e04 (patch) | |
| tree | bfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lisp/emacs-lisp/copyright.el | |
| parent | bbc108377873aa6ed7cf21c731770103096eea39 (diff) | |
| parent | ba355de014b75ed104da4777f909db70d62f2357 (diff) | |
| download | emacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz | |
Merge from trunk.
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
| -rw-r--r-- | lisp/emacs-lisp/copyright.el | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index b3fc6fb887a..2b2189e70e3 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -1,7 +1,6 @@ ;;; copyright.el --- update the copyright notice in current buffer -;; Copyright (C) 1991-1995, 1998, 2001-2013 Free Software Foundation, -;; Inc. +;; Copyright (C) 1991-1995, 1998, 2001-2013 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Keywords: maint, tools @@ -145,18 +144,17 @@ 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. - (copyright-re-search (concat "\\(" copyright-regexp - "\\)\\([ \t]*\n\\)?.*\\(?:" - copyright-names-regexp "\\)") - (copyright-limit) - t) - ;; In case the regexp is rejected. This is useful because - ;; copyright-update is typically called from before-save-hook where - ;; such an error is very inconvenient for the user. - (error (message "Can't update copyright: %s" err) nil))) + ;; In case the regexp is rejected. This is useful because + ;; copyright-update is typically called from before-save-hook where + ;; such an error is very inconvenient for the user. + (with-demoted-errors "Can't update copyright: %s" + ;; (1) Need the extra \\( \\) around copyright-regexp because we + ;; goto (match-end 1) below. See note (2) below. + (copyright-re-search (concat "\\(" copyright-regexp + "\\)\\([ \t]*\n\\)?.*\\(?:" + copyright-names-regexp "\\)") + (copyright-limit) + t))) (defun copyright-find-end () "Possibly adjust the search performed by `copyright-find-copyright'. |
