Function: apropos-internal

apropos-internal is a byte-compiled function defined in subr.el.gz.

Signature

(apropos-internal REGEXP &optional PREDICATE)

Documentation

Show all symbols whose names contain match for REGEXP.

If optional 2nd arg PREDICATE is non-nil, (funcall PREDICATE SYMBOL) is done for each symbol and a symbol is mentioned only if that returns non-nil. Return list of symbols found.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
;;; Apropos.

(defun apropos-internal (regexp &optional predicate)
  "Show all symbols whose names contain match for REGEXP.
If optional 2nd arg PREDICATE is non-nil, (funcall PREDICATE SYMBOL) is done
for each symbol and a symbol is mentioned only if that returns non-nil.
Return list of symbols found."
  (let (found)
    (mapatoms (lambda (symbol)
                (when (and (string-match regexp (symbol-name symbol))
                           (or (not predicate)
                               (funcall predicate symbol)))
                  (push symbol found))))
    (sort found #'string-lessp)))