aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Pluim2023-02-21 15:20:56 +0100
committerRobert Pluim2023-02-21 15:25:36 +0100
commit1976ca1634d8c53a980299cb08778830cc7d90cf (patch)
treeb9fbfde22728c0f68f8d4888eb67e9f6e81b8d85
parent16ca258b1fcf46ecf4e9d04ce950ed286984fad1 (diff)
downloademacs-1976ca1634d8c53a980299cb08778830cc7d90cf.tar.gz
emacs-1976ca1634d8c53a980299cb08778830cc7d90cf.zip
Make 'emacs-news-cycle-tag' work at all levels
* lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Search for a heading starting with 2 or more '*' rather than exactly 3. * test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts (Point-Char): Add tests for 2 and 4 '*' levels.
-rw-r--r--lisp/textmodes/emacs-news-mode.el4
-rw-r--r--test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts89
2 files changed, 92 insertions, 1 deletions
diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el
index c5e7b8f4bc6..773b07764aa 100644
--- a/lisp/textmodes/emacs-news-mode.el
+++ b/lisp/textmodes/emacs-news-mode.el
@@ -195,7 +195,9 @@ untagged NEWS entry."
195 (goto-char (line-beginning-position)) 195 (goto-char (line-beginning-position))
196 (cond ((or (looking-at (rx bol (or "---" "+++") eol))) 196 (cond ((or (looking-at (rx bol (or "---" "+++") eol)))
197 (forward-line 2)) 197 (forward-line 2))
198 ((or (looking-at (rx bol "*** "))) 198 ((or (looking-at (rx bol "**"
199 (zero-or-more "*")
200 " ")))
199 (forward-line 1))) 201 (forward-line 1)))
200 (outline-previous-visible-heading 1) 202 (outline-previous-visible-heading 1)
201 (forward-line -1) 203 (forward-line -1)
diff --git a/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts b/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts
index 63c3b1b7d8a..c3d32f6f05c 100644
--- a/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts
+++ b/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts
@@ -129,3 +129,92 @@ The corresponding key "% Y" is now bound by default in Dired.
129Before, that binding was only available if the 'dired-x' package was 129Before, that binding was only available if the 'dired-x' package was
130loaded. 130loaded.
131=-=-= 131=-=-=
132
133Name: tag7-2level
134Point-Char: |
135
136=-=
137+++
138** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
139The corresponding key "% Y" is now bound by default in Dired.
140
141|+++
142** 'M-G' is now bound to 'dired-goto-subdir'.
143Before, that binding was only available if the 'dired-x' package was
144loaded.
145=-=
146+++
147** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
148The corresponding key "% Y" is now bound by default in Dired.
149
150|** 'M-G' is now bound to 'dired-goto-subdir'.
151Before, that binding was only available if the 'dired-x' package was
152loaded.
153=-=-=
154
155Name: tag8-2level
156Point-Char: |
157
158=-=
159+++
160** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
161The corresponding key "% Y" is now bound by default in Dired.
162
163+++
164|** 'M-G' is now bound to 'dired-goto-subdir'.
165Before, that binding was only available if the 'dired-x' package was
166loaded.
167=-=
168+++
169** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
170The corresponding key "% Y" is now bound by default in Dired.
171
172|** 'M-G' is now bound to 'dired-goto-subdir'.
173Before, that binding was only available if the 'dired-x' package was
174loaded.
175=-=-=
176
177Name: tag9-2level-notag
178Point-Char: |
179
180=-=
181+++
182** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
183The corresponding key "% Y" is now bound by default in Dired.
184
185|** 'M-G' is now bound to 'dired-goto-subdir'.
186Before, that binding was only available if the 'dired-x' package was
187loaded.
188=-=
189+++
190** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
191The corresponding key "% Y" is now bound by default in Dired.
192
193---
194|** 'M-G' is now bound to 'dired-goto-subdir'.
195Before, that binding was only available if the 'dired-x' package was
196loaded.
197=-=-=
198
199
200Name: tag10-4level
201Point-Char: |
202
203=-=
204+++
205**** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
206The corresponding key "% Y" is now bound by default in Dired.
207
208|**** 'M-G' is now bound to 'dired-goto-subdir'.
209Before, that binding was only available if the 'dired-x' package was
210loaded.
211=-=
212+++
213**** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
214The corresponding key "% Y" is now bound by default in Dired.
215
216---
217|**** 'M-G' is now bound to 'dired-goto-subdir'.
218Before, that binding was only available if the 'dired-x' package was
219loaded.
220=-=-=