From: Stefan Kangas Date: Fri, 16 Sep 2022 14:06:09 +0000 (+0200) Subject: Add command to delete temporary markers in NEWS X-Git-Tag: emacs-29.0.90~1856^2~449 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d407bdfd01a8fa4a1a20b8b0f1d07629be4ae54f;p=emacs.git Add command to delete temporary markers in NEWS * lisp/textmodes/emacs-news-mode.el (emacs-news-delete-temporary-markers): New command. * admin/make-tarball.txt: Update instructions. --- diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index ad2aacb57a9..9a406b24fa1 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -52,11 +52,12 @@ General steps (for each step, check for possible errors): ./autogen.sh ./configure --with-native-compilation && make - For a release (as opposed to pretest), delete any left-over "---" - and "+++" markers from etc/NEWS, as well as the "Temporary note" - section at the beginning of that file, and commit etc/NEWS if it - was modified. For a bug fix release (e.g. 28.2), delete any empty - headlines too. + For a release (as opposed to pretest), visit etc/NEWS and use the + "M-x emacs-news-delete-temporary-markers" command to delete any + left-over "---" and "+++" markers from etc/NEWS, as well as the + "Temporary note" section at the beginning of that file, and commit + etc/NEWS if it was modified. For a bug fix release (e.g. 28.2), + delete any empty headlines too. 2. Regenerate the versioned ChangeLog.N and etc/AUTHORS files. diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index 6bf96deaccb..88e89480609 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -276,6 +276,17 @@ documentation marks on the previous line." (forward-line -1)) (open-line n)) +(defun emacs-news-delete-temporary-markers () + "Delete any temporary markers. +This is used when preparing a new release of Emacs." + (interactive nil emacs-news-mode) + (goto-char (point-min)) + (re-search-forward "^Temporary note:$") + (forward-line -1) + (delete-region (point) (save-excursion (forward-paragraph) (point))) + (while (re-search-forward (rx bol (or "+++" "---") eol) nil t) + (delete-line))) + (provide 'emacs-news-mode) ;;; emacs-news-mode.el ends here