]> git.eshelyaron.com Git - emacs.git/commitdiff
Add command to delete temporary markers in NEWS
authorStefan Kangas <stefankangas@gmail.com>
Fri, 16 Sep 2022 14:06:09 +0000 (16:06 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Fri, 16 Sep 2022 14:14:43 +0000 (16:14 +0200)
* lisp/textmodes/emacs-news-mode.el
(emacs-news-delete-temporary-markers): New command.
* admin/make-tarball.txt: Update instructions.

admin/make-tarball.txt
lisp/textmodes/emacs-news-mode.el

index ad2aacb57a9ea00a5c80c7b46f780570c16cac87..9a406b24fa1ecb95270e91bf14a492fb619b7392 100644 (file)
@@ -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.
 
index 6bf96deaccb88d4a61b22abd7bf656cae6b31872..88e89480609b89e6f2646ad7c30ee50ccc743803 100644 (file)
@@ -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