diff options
| author | Robert Pluim | 2023-02-21 15:20:56 +0100 |
|---|---|---|
| committer | Robert Pluim | 2023-02-21 15:25:36 +0100 |
| commit | 1976ca1634d8c53a980299cb08778830cc7d90cf (patch) | |
| tree | b9fbfde22728c0f68f8d4888eb67e9f6e81b8d85 | |
| parent | 16ca258b1fcf46ecf4e9d04ce950ed286984fad1 (diff) | |
| download | emacs-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.el | 4 | ||||
| -rw-r--r-- | test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts | 89 |
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. | |||
| 129 | Before, that binding was only available if the 'dired-x' package was | 129 | Before, that binding was only available if the 'dired-x' package was |
| 130 | loaded. | 130 | loaded. |
| 131 | =-=-= | 131 | =-=-= |
| 132 | |||
| 133 | Name: tag7-2level | ||
| 134 | Point-Char: | | ||
| 135 | |||
| 136 | =-= | ||
| 137 | +++ | ||
| 138 | ** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 139 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 140 | |||
| 141 | |+++ | ||
| 142 | ** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 143 | Before, that binding was only available if the 'dired-x' package was | ||
| 144 | loaded. | ||
| 145 | =-= | ||
| 146 | +++ | ||
| 147 | ** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 148 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 149 | |||
| 150 | |** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 151 | Before, that binding was only available if the 'dired-x' package was | ||
| 152 | loaded. | ||
| 153 | =-=-= | ||
| 154 | |||
| 155 | Name: tag8-2level | ||
| 156 | Point-Char: | | ||
| 157 | |||
| 158 | =-= | ||
| 159 | +++ | ||
| 160 | ** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 161 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 162 | |||
| 163 | +++ | ||
| 164 | |** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 165 | Before, that binding was only available if the 'dired-x' package was | ||
| 166 | loaded. | ||
| 167 | =-= | ||
| 168 | +++ | ||
| 169 | ** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 170 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 171 | |||
| 172 | |** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 173 | Before, that binding was only available if the 'dired-x' package was | ||
| 174 | loaded. | ||
| 175 | =-=-= | ||
| 176 | |||
| 177 | Name: tag9-2level-notag | ||
| 178 | Point-Char: | | ||
| 179 | |||
| 180 | =-= | ||
| 181 | +++ | ||
| 182 | ** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 183 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 184 | |||
| 185 | |** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 186 | Before, that binding was only available if the 'dired-x' package was | ||
| 187 | loaded. | ||
| 188 | =-= | ||
| 189 | +++ | ||
| 190 | ** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 191 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 192 | |||
| 193 | --- | ||
| 194 | |** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 195 | Before, that binding was only available if the 'dired-x' package was | ||
| 196 | loaded. | ||
| 197 | =-=-= | ||
| 198 | |||
| 199 | |||
| 200 | Name: tag10-4level | ||
| 201 | Point-Char: | | ||
| 202 | |||
| 203 | =-= | ||
| 204 | +++ | ||
| 205 | **** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 206 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 207 | |||
| 208 | |**** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 209 | Before, that binding was only available if the 'dired-x' package was | ||
| 210 | loaded. | ||
| 211 | =-= | ||
| 212 | +++ | ||
| 213 | **** 'dired-do-relsymlink-regexp' moved from dired-x to dired. | ||
| 214 | The corresponding key "% Y" is now bound by default in Dired. | ||
| 215 | |||
| 216 | --- | ||
| 217 | |**** 'M-G' is now bound to 'dired-goto-subdir'. | ||
| 218 | Before, that binding was only available if the 'dired-x' package was | ||
| 219 | loaded. | ||
| 220 | =-=-= | ||