diff options
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index baef5a789ae..39f701ae2a8 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -597,7 +597,7 @@ FILE is the file where FUNCTION was probably defined." ;; of the *packages* in which the function is defined. (let* ((name (symbol-name symbol)) (re (concat "\\_<" (regexp-quote name) "\\_>")) - (news (directory-files data-directory t "\\`NEWS")) + (news (directory-files data-directory t "\\`NEWS.[1-9]")) (place nil) (first nil)) (with-temp-buffer @@ -612,7 +612,7 @@ FILE is the file where FUNCTION was probably defined." ;; Almost all entries are of the form "* ... in Emacs NN.MM." ;; but there are also a few in the form "* Emacs NN.MM is a bug ;; fix release ...". - (if (not (re-search-backward "^\\* .* Emacs \\([0-9.]+[0-9]\\)" + (if (not (re-search-backward "^\\*.* Emacs \\([0-9.]+[0-9]\\)" nil t)) (message "Ref found in non-versioned section in %S" (file-name-nondirectory f)) @@ -621,7 +621,8 @@ FILE is the file where FUNCTION was probably defined." (setq place (list f pos)) (setq first version))))))))) (when first - (make-text-button first nil 'type 'help-news 'help-args place)))) + (make-text-button first nil 'type 'help-news 'help-args place)) + first)) (add-hook 'help-fns-describe-function-functions #'help-fns--mention-first-release) |