mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(iswitchb-get-matched-buffers): Handle invalid-regexp errors in
post-command-hook.
This commit is contained in:
parent
94d4bafbec
commit
2cf248ab2e
1 changed files with 18 additions and 13 deletions
|
|
@ -889,22 +889,27 @@ BUFFER-LIST can be list of buffers or list of strings."
|
|||
(do-string (stringp (car list)))
|
||||
name
|
||||
ret)
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
(catch 'invalid-regexp
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
|
||||
(if do-string
|
||||
(setq name x) ;We already have the name
|
||||
(setq name (buffer-name 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)))
|
||||
(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)
|
||||
(not (iswitchb-ignore-buffername-p name)))
|
||||
(setq ret (cons name ret))
|
||||
)))
|
||||
list))
|
||||
ret))
|
||||
|
||||
(defun iswitchb-ignore-buffername-p (bufname)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue