emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d407bdfd01 1/2: Add command to delete temporary markers in NEWS


From: Stefan Kangas
Subject: master d407bdfd01 1/2: Add command to delete temporary markers in NEWS
Date: Fri, 16 Sep 2022 10:15:47 -0400 (EDT)

branch: master
commit d407bdfd01a8fa4a1a20b8b0f1d07629be4ae54f
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    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.
---
 admin/make-tarball.txt            | 11 ++++++-----
 lisp/textmodes/emacs-news-mode.el | 11 +++++++++++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index ad2aacb57a..9a406b24fa 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 6bf96deacc..88e8948060 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]