Index: iswitchb.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/iswitchb.el,v retrieving revision 1.55 diff -u -r1.55 iswitchb.el --- iswitchb.el 22 Aug 2004 10:58:16 -0000 1.55 +++ iswitchb.el 22 May 2005 09:26:36 -0000 @@ -889,22 +889,27 @@ (do-string (stringp (car list))) name ret) - (mapcar - (lambda (x) - - (if do-string - (setq name x) ;We already have the name - (setq name (buffer-name x))) - - (cond - ((and (or (and string-format (string-match regexp name)) - (and (null string-format) - (string-match (regexp-quote regexp) name))) - - (not (iswitchb-ignore-buffername-p name))) - (setq ret (cons name ret)) - ))) - list) + (catch 'invalid-regexp + (mapcar + (lambda (x) + + (if do-string + (setq name x) ;We already have the name + (setq name (buffer-name x))) + + (cond + ((and (or (and string-format + (condition-case error + (string-match regexp name) + (invalid-regexp + (throw 'invalid-regexp (setq ret (cdr error)))))) + (and (null string-format) + (string-match (regexp-quote regexp) name))) + + (not (iswitchb-ignore-buffername-p name))) + (setq ret (cons name ret)) + ))) + list)) ret)) (defun iswitchb-ignore-buffername-p (bufname)