Function: iswitchb-get-matched-buffers

iswitchb-get-matched-buffers is a byte-compiled function defined in iswitchb.el.gz.

Signature

(iswitchb-get-matched-buffers REGEXP &optional STRING-FORMAT BUFFER-LIST)

Documentation

Return buffers matching REGEXP.

If STRING-FORMAT is nil, consider REGEXP as just a string. BUFFER-LIST can be list of buffers or list of strings.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/iswitchb.el.gz
(defun iswitchb-get-matched-buffers (regexp
				     &optional string-format buffer-list)
  "Return buffers matching REGEXP.
If STRING-FORMAT is nil, consider REGEXP as just a string.
BUFFER-LIST can be list of buffers or list of strings."
  (let ((case-fold-search (iswitchb-case))
         name ret)
    (if (null string-format) (setq regexp (regexp-quote regexp)))
    (setq iswitchb-invalid-regexp nil)
    (condition-case error
        (dolist (x buffer-list (nreverse ret))
          (setq name (if (stringp x) x (buffer-name x)))
          (when (and (string-match regexp name)
                     (not (iswitchb-ignore-buffername-p name)))
            (push name ret)))
      (invalid-regexp
       (setq iswitchb-invalid-regexp t)
       (cdr error)))))