all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Anantha Kumaran <ananthakumaran@gmail.com>
To: emacs-devel@gnu.org
Subject: ido-completing-read modifies the choices argument
Date: Mon, 22 Aug 2011 16:25:52 +0530	[thread overview]
Message-ID: <CACxPpPCLRLOSGv-NmJuLqt6HchGJXWnqCtN2jDHhC3pJTw_xRA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

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)

[-- Attachment #2: Type: text/html, Size: 1280 bytes --]

             reply	other threads:[~2011-08-22 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 10:55 Anantha Kumaran [this message]
2013-03-24 12:14 ` ido-completing-read modifies the choices argument Leo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACxPpPCLRLOSGv-NmJuLqt6HchGJXWnqCtN2jDHhC3pJTw_xRA@mail.gmail.com \
    --to=ananthakumaran@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.