Function: apropos-documentation
apropos-documentation is an autoloaded, interactive and byte-compiled
function defined in apropos.el.gz.
Signature
(apropos-documentation PATTERN &optional DO-ALL)
Documentation
Show symbols whose documentation contains matches for PATTERN.
PATTERN can be a word, a list of words (separated by spaces), or a regexp (using some regexp special characters). If it is a word, search for matches for that word as a substring. If it is a list of words, search for matches for any two (or more) of those words.
Note that by default this command only searches in the functions predefined
at Emacs startup, i.e., the primitives implemented in C or preloaded in the
Emacs dump image.
With C-u (universal-argument) prefix, or if apropos-do-all is non-nil, it searches
all currently defined documentation strings.
Returns list of symbols and documentation found.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/apropos.el.gz
;;;###autoload
(defun apropos-documentation (pattern &optional do-all)
"Show symbols whose documentation contains matches for PATTERN.
PATTERN can be a word, a list of words (separated by spaces),
or a regexp (using some regexp special characters). If it is a word,
search for matches for that word as a substring. If it is a list of words,
search for matches for any two (or more) of those words.
Note that by default this command only searches in the functions predefined
at Emacs startup, i.e., the primitives implemented in C or preloaded in the
Emacs dump image.
With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil, it searches
all currently defined documentation strings.
Returns list of symbols and documentation found."
;; The doc used to say that DO-ALL includes key-bindings info in the
;; output, but I cannot see that that is true.
(interactive (list (apropos-read-pattern "documentation")
current-prefix-arg))
(setq apropos--current (list #'apropos-documentation pattern do-all))
(apropos-parse-pattern pattern t)
(or do-all (setq do-all apropos-do-all))
(let ((apropos-accumulator ())
(apropos-files-scanned ())
(delayed (make-hash-table :test #'equal)))
(with-temp-buffer
(let ((standard-input (current-buffer))
(apropos-sort-by-scores apropos-documentation-sort-by-scores)
f v)
(apropos-documentation-check-doc-file)
(funcall
(if do-all #'mapatoms #'apropos--map-preloaded-atoms)
(lambda (symbol)
(setq f (apropos-safe-documentation symbol)
v (get symbol 'variable-documentation))
(if (integerp v) (setq v nil))
(if (consp f)
(push (list symbol (cdr f) 1) (gethash (car f) delayed))
(apropos--documentation-add symbol f 1))
(if (consp v)
(push (list symbol (cdr v) 2) (gethash (car v) delayed))
(apropos--documentation-add symbol v 2))))
(maphash #'apropos--documentation-add-from-elc delayed)
(apropos-print nil "\n----------------\n" nil t)))))