From: Darren Hoo Date: Sat, 27 Apr 2013 22:03:42 +0000 (+0300) Subject: * lisp/isearch.el (isearch-fail-pos): Check for empty `cmds'. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~347 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ffa2d4f29440a26680c9ceb9cc81ca18e5f3029;p=emacs.git * lisp/isearch.el (isearch-fail-pos): Check for empty `cmds'. Fixes: debbugs:14268 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e69fe4b9d0f..163f2495849 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-04-27 Darren Hoo (tiny change) + + * isearch.el (isearch-fail-pos): Check for empty `cmds'. (Bug#14268) + 2013-04-27 Glenn Morris * vc/log-view.el (log-view-current-entry): diff --git a/lisp/isearch.el b/lisp/isearch.el index b36b250738a..b38bfc885f7 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1106,8 +1106,9 @@ If MSG is non-nil, use variable `isearch-message', otherwise `isearch-string'." (curr-msg (if msg isearch-message isearch-string)) succ-msg) (when (or (not isearch-success) isearch-error) - (while (or (not (isearch--state-success (car cmds))) - (isearch--state-error (car cmds))) + (while (and cmds + (or (not (isearch--state-success (car cmds))) + (isearch--state-error (car cmds)))) (pop cmds)) (setq succ-msg (and cmds (if msg (isearch--state-message (car cmds)) (isearch--state-string (car cmds)))))