From 438b0579ab80032061096c637e0fe10b97ae5a38 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 20 Mar 2013 11:05:34 +0800 Subject: * ido.el (ido-chop): Fix bug#10994. --- lisp/ChangeLog | 4 ++++ lisp/ido.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c111a6633..59cf8bac5f 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 589f44175e..7ace1811da 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 -- cgit v1.2.3