Commit graph

9 commits

Author SHA1 Message Date
Mattias Engdegård
da77d70dee ; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe. 2023-01-01 13:18:50 +01:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Lele Gaifax
70c3437ae1 Fix copyright-fix-years, use a dash to separate years in a range
Commit 7a46fa9c75, allowing en-dash as
years separator, changed the way the years range is composed taking the
separator from the `sep' variable instead of always using an hardwired
hyphen. Since the code explicitly avoid to touch (that is, extend)
existing ranges, that `sep' variable is almost always a space, or
whatever character precedes the last parsed year, thus generating a
range like "2020 2022" instead of "2020-2022".

* lisp/emacs-lisp/copyright.el (copyright-fix-years): Always use an dash
to separate years in a range.

* test/lisp/emacs-lisp/copyright-tests.el (with-copyright-fix-years-test):
(copyright-fix-years-tests--data):
(text-copyright-fix-years): New test cases (bug#53597).
2022-01-28 15:23:05 +01:00
Lars Ingebrigtsen
826959ccb4 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).
2022-01-26 15:02:00 +01:00
Lars Ingebrigtsen
8a343ecee5 Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).
2022-01-26 14:53:07 +01:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Philipp Stephani
7a46fa9c75 Allow years in a copyright range to be separated by en dashes.
* lisp/emacs-lisp/copyright.el (copyright-regexp)
(copyright-years-regexp, copyright-update-year)
(copyright-fix-years): Also include en dash.

* test/lisp/emacs-lisp/copyright-tests.el (copyright-tests--data): New
test cases.
2021-05-25 14:04:06 +02:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Stefan Kangas
9f1dd2a7d5 Use lexical-binding in copyright.el and add tests
* lisp/emacs-lisp/copyright.el: Use lexical-binding.  Remove
redundant :group args.
* test/lisp/emacs-lisp/copyright-tests.el: New file.
2020-10-24 13:35:49 +02:00