mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-15 09:47:20 +00:00
Suppress false positives in apropos-value
* lisp/apropos.el (apropos-value): Skip more apropos-internal variables (bug#48063). (apropos-value-internal): Skip the first value in the history values, which always contains the match.
This commit is contained in:
parent
f1adb6b77a
commit
eda4888e54
@ -814,6 +814,7 @@ Returns list of symbols and values found."
|
|||||||
(lambda (symbol)
|
(lambda (symbol)
|
||||||
(setq f nil v nil p nil)
|
(setq f nil v nil p nil)
|
||||||
(or (memq symbol '(apropos-regexp
|
(or (memq symbol '(apropos-regexp
|
||||||
|
apropos--current apropos-pattern-quoted pattern
|
||||||
apropos-pattern apropos-all-words-regexp
|
apropos-pattern apropos-all-words-regexp
|
||||||
apropos-words apropos-all-words
|
apropos-words apropos-all-words
|
||||||
do-all apropos-accumulator
|
do-all apropos-accumulator
|
||||||
@ -928,7 +929,13 @@ Returns list of symbols and documentation found."
|
|||||||
|
|
||||||
(defun apropos-value-internal (predicate symbol function)
|
(defun apropos-value-internal (predicate symbol function)
|
||||||
(when (funcall predicate symbol)
|
(when (funcall predicate symbol)
|
||||||
(setq symbol (prin1-to-string (funcall function symbol)))
|
(setq symbol (prin1-to-string
|
||||||
|
(if (memq symbol '(command-history minibuffer-history))
|
||||||
|
;; The value we're looking for will always be in
|
||||||
|
;; the first element of these two lists, so skip
|
||||||
|
;; that value.
|
||||||
|
(cdr (funcall function symbol))
|
||||||
|
(funcall function symbol))))
|
||||||
(when (string-match apropos-regexp symbol)
|
(when (string-match apropos-regexp symbol)
|
||||||
(if apropos-match-face
|
(if apropos-match-face
|
||||||
(put-text-property (match-beginning 0) (match-end 0)
|
(put-text-property (match-beginning 0) (match-end 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user