From fe4b9df4f4bbf11d6b6d616aad77f7e0c347903b Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 25 Aug 2026 13:35:08 +0100 Subject: [PATCH] Adjust generating HTML for historic NEWS * admin/admin.el (make-news-html-file): If the major version given has it's own NEWS file, use that. Understand non-continuous copyright years. Copyright-paperwork-exempt: yes --- admin/admin.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index f05dc0980e1..5fc44909537 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -896,7 +896,10 @@ $Date: %s $ (unless (file-exists-p (expand-file-name "src/emacs.c" root)) (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) (admin--require-external-package 'htmlize) - (let* ((newsfile (expand-file-name "etc/NEWS" root)) + (let* ((oldnewsfile (expand-file-name (format "etc/NEWS.%s" version) root)) + (newsfile (if (file-exists-p oldnewsfile) + oldnewsfile + (expand-file-name "etc/NEWS" root))) (orgfile (expand-file-name (format "etc/NEWS.%s.org" version) root)) (html (format "%s.html" (file-name-base orgfile))) (copyright-years (format-time-string "%Y"))) @@ -906,7 +909,7 @@ $Date: %s $ ;; Find the copyright range. (goto-char (point-min)) - (re-search-forward "^Copyright (C) \\([0-9-]+\\) Free Software Foundation, Inc.") + (re-search-forward "^Copyright (C) \\([0-9, -]+\\) Free Software Foundation, Inc.") (setq copyright-years (match-string 1)) ;; Delete some unnecessary stuff.