Weed out some false positives in help-fns--mention-first-release

* lisp/help-fns.el (help-fns--mention-first-release): Weed out
things that give too many false positives (bug#49062).
This commit is contained in:
Lars Ingebrigtsen 2022-07-16 13:52:20 +02:00
parent 38f9e9cb2c
commit 630bbe3932

View file

@ -837,6 +837,15 @@ the C sources, too."
(unless (memq 'help-fns--customize-variable-version
help-fns--activated-functions)
(when-let ((first (and (symbolp object)
;; Weed out things that probably aren't
;; official things (so that we don't say
;; "Introduced in version 1.1" if the user
;; has done `(setq a 42)').
(or (string-search "-" (symbol-name object))
(and (boundp object)
(get object 'variable-documentation))
(and (fboundp object)
(documentation object)))
(help-fns--first-release object))))
(with-current-buffer standard-output
(insert (format " Probably introduced at or before Emacs version %s.\n"