emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ido-completing-read modifies the choices argument


From: Anantha Kumaran
Subject: ido-completing-read modifies the choices argument
Date: Mon, 22 Aug 2011 16:25:52 +0530

Hi,

When a default value is passed to ido-completing-read, it removes the default value from the choices(argument).
I wonder whether this is a bug or desired behaviour.


(defun ido-make-choice-list (default)
  ;; Return the current list of choices.
  ;; If DEFAULT is non-nil, and corresponds to an element of choices,
  ;; it is put to the start of the list.
  (let ((ido-temp-list ido-choice-list))
    (if default
(progn
 (setq ido-temp-list
(delete default ido-temp-list))
 (setq ido-temp-list
(cons default ido-temp-list))))
    ; (run-hooks 'ido-make-choice-list-hook)
    ido-temp-list))


--
Anantha Kumaran(http://ananthakumaran.in)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]