From: Leo Liu Date: Wed, 20 Mar 2013 03:05:34 +0000 (+0800) Subject: * ido.el (ido-chop): Fix bug#10994. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~530^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=438b0579ab80032061096c637e0fe10b97ae5a38;p=emacs.git * ido.el (ido-chop): Fix bug#10994. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c111a66335..59cf8bac5fb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-03-20 Leo Liu + + * ido.el (ido-chop): Fix bug#10994. + 2013-03-19 Dmitry Gutov * whitespace.el (whitespace-font-lock, whitespace-font-lock-mode): diff --git a/lisp/ido.el b/lisp/ido.el index 589f44175eb..7ace1811daa 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3150,13 +3150,15 @@ for first matching file." (exit-minibuffer))) (defun ido-chop (items elem) - "Remove all elements before ELEM and put them at the end of ITEMS." + "Remove all elements before ELEM and put them at the end of ITEMS. +Use `eq' for comparison." (let ((ret nil) (next nil) (sofar nil)) (while (not ret) (setq next (car items)) - (if (equal next elem) + ;; Use `eq' to avoid bug http://debbugs.gnu.org/10994 + (if (eq next elem) (setq ret (append items (nreverse sofar))) ;; else (progn