Subject: bug#41021: [PATCH] New command apropos-function

From: Drew Adams <[email-masked]>
Date: Sat, 2 May 2020 13:18:16 -0700 (PDT)

FWIW, this has been in my library `apropos-fn+var.el' since 2005.

The file header includes this:

;;  Acknowledgment: Slightly different versions of `apropos-function'
;;  and `apropos-variable' were posted by Kevin Rodgers to
;;  bug-gnu-emacs, Tue, 06 Sep 2005 14:34:54 -0600.  Kevin didn't
;;  actually redefine `apropos-variable' (he would never do that ;-)),
;;  but he provided the new definition.  I redefined `apropos-print'
;;  (and added button type `apropos-user-option' for Emacs < 24.4).

This is my `apropos-function':

(defun apropos-function (pattern)
  "Show functions that match PATTERN.
This includes functions that are not commands.
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.

When called from a Lisp program, a string PATTERN is used as a regexp,
while a list of strings is used as a word list."
  (interactive "i")
  (if (interactive-p)
      (let ((apropos-do-all t))
        (call-interactively 'apropos-command))
    (apropos-command pattern t)))

https://www.emacswiki.org/emacs/download/apropos-fn%2bvar.el