Function: apropos-read-pattern

apropos-read-pattern is an autoloaded and byte-compiled function defined in apropos.el.gz.

Signature

(apropos-read-pattern SUBJECT)

Documentation

Read an apropos pattern, either a word list or a regexp.

Returns the user pattern, either a list of words which are matched literally, or a string which is used as a regexp to search for.

SUBJECT is a string that is included in the prompt to identify what kind of objects to search.

Source Code

;; Defined in /usr/src/emacs/lisp/apropos.el.gz
;;;###autoload
(defun apropos-read-pattern (subject)
  "Read an apropos pattern, either a word list or a regexp.
Returns the user pattern, either a list of words which are matched
literally, or a string which is used as a regexp to search for.

SUBJECT is a string that is included in the prompt to identify what
kind of objects to search."
  (let ((pattern
	 (read-string (concat "Search for " subject " (word list or regexp): "))))
    (if (string-equal (regexp-quote pattern) pattern)
	;; Split into words
	(or (split-string pattern "[ \t]+" t)
	    (user-error "No word list given"))
      pattern)))