Fix 'emacs-news-find-heading'

* lisp/textmodes/emacs-news-mode.el (emacs-news-find-heading):
HEADING must be a complete line, otherwise we have false positives
and false negatives.  (Bug#80569)
This commit is contained in:
Eli Zaretskii 2026-03-09 19:14:51 +02:00
parent 82b5656276
commit c108a28203

View file

@ -309,7 +309,7 @@ Only such HEADINGs are accepted in interactive invocations."
nil t))
emacs-news-mode)
(goto-char (point-min))
(when (re-search-forward (concat "^*+ " (regexp-quote heading)) nil t)
(when (re-search-forward (concat "^*+ " (regexp-quote heading) "$") nil t)
(beginning-of-line)))
(defun emacs-news-open-line (n)