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:03:56 +0100
commitc5b0019e1047d3b770611bb7dea3d2a705e56082 (patch)
tree9e8917c423d63265676693aa03f5008f308639b6 /lisp/emacs-lisp
parented18d08f6f3041e6fd1806690c24ca6b31deab2d (diff)
downloademacs-c5b0019e1047d3b770611bb7dea3d2a705e56082.tar.gz
emacs-c5b0019e1047d3b770611bb7dea3d2a705e56082.tar.bz2
emacs-c5b0019e1047d3b770611bb7dea3d2a705e56082.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). Do not merge to master.
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 ()