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.
This commit is contained in:
Lars Ingebrigtsen 2022-01-26 15:02:00 +01:00
parent ed18d08f6f
commit c5b0019e10
2 changed files with 14 additions and 1 deletions

View file

@ -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 ()