aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2013-03-20 11:05:34 +0800
committerLeo Liu <[email protected]>2013-03-20 11:05:34 +0800
commit438b0579ab80032061096c637e0fe10b97ae5a38 (patch)
tree173afba2a4b64c56701ec3a8c9d62ea4305f2f4d
parentc128ab07ce58406bbadae797459ab84cf48ff441 (diff)
* ido.el (ido-chop): Fix bug#10994.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/ido.el6
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 <[email protected]>
+
+ * ido.el (ido-chop): Fix bug#10994.
+
2013-03-19 Dmitry Gutov <[email protected]>
* 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