summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-26 15:02:00 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-26 15:02:00 +0100
commit826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc (patch)
tree54a694b893a8eb0e8597d3bca6c81a52c0e5ae8a /lisp/emacs-lisp
parent8a343ecee543faeb1be1e7e9de5f3163209f4da6 (diff)
downloademacs-826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc.tar.gz
emacs-826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc.tar.bz2
emacs-826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc.zip
Fix copyright-find-copyright when searching from the end
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make the double check also work when searching from the end (bug#7179).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/copyright.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 23b90808d90..6b600977823 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -152,7 +152,9 @@ This function sets the match data that `copyright-update-year' uses."
;; copyright line, so re-perform the search without the
;; limit. (Otherwise we may be inserting the new year in the
;; middle of the list of years.)
- (goto-char (match-beginning 0))
+ (if copyright-at-end-flag
+ (goto-char (match-end 0))
+ (goto-char (match-beginning 0)))
(copyright-re-search regexp nil t)))))
(defun copyright-find-end ()