Function: customize-apropos

customize-apropos is an autoloaded, interactive and byte-compiled function defined in cus-edit.el.gz.

Signature

(customize-apropos PATTERN &optional TYPE)

Documentation

Customize loaded options, faces and groups matching 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.

If TYPE is options, include only options. If TYPE is faces, include only faces. If TYPE is groups, include only groups.

View in manual

Probably introduced at or before Emacs version 24.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
;;;###autoload
(defun customize-apropos (pattern &optional type)
  "Customize loaded options, faces and groups matching 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.

If TYPE is `options', include only options.
If TYPE is `faces', include only faces.
If TYPE is `groups', include only groups."
  (interactive (list (apropos-read-pattern "symbol") nil))
  (require 'apropos)
  (unless (memq type '(nil options faces groups))
    (error "Invalid setting type %s" (symbol-name type)))
  (apropos-parse-pattern pattern)    ;Sets apropos-regexp by side-effect: Yuck!
  (let (found)
    (mapatoms
     (lambda (symbol)
       (when (string-match-p apropos-regexp (symbol-name symbol))
         (if (memq type '(nil groups))
             (if (get symbol 'custom-group)
                 (push (list symbol 'custom-group) found)))
         (if (memq type '(nil faces))
             (if (facep symbol)
                 (push (list symbol 'custom-face) found)))
         (if (memq type '(nil options))
             (if (and (boundp symbol)
                      (eq (indirect-variable symbol) symbol)
                      (or (get symbol 'saved-value)
                          (custom-variable-p symbol)))
                 (push (list symbol 'custom-variable) found))))))
    (unless found
      (error "No customizable %s matching %s" (if (not type)
						  "group, face, or option"
						(symbol-name type))
	     pattern))
    (custom-buffer-create
     (custom--filter-obsolete-variables
      (custom-sort-items found t custom-buffer-order-groups))
     "*Customize Apropos*")))