all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: miles@gnu.org, Luc Teirlinck <teirllm@dms.auburn.edu>,
	rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Bugs in newly added completion capabilities.
Date: Fri, 01 Jul 2005 10:59:46 -0400	[thread overview]
Message-ID: <87br5mbmra.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3u0jf6izz.fsf@kfs-l.imdomain.dk> (Kim F. Storm's message of "Fri, 01 Jul 2005 10:14:08 +0200")

>> since the following change made relatively recently (I thought we were
>> in a feature freeze, but anyway):
>> 
>> 2005-02-22  Kim F. Storm  <storm@cua.dk>
>> 
>> * minibuf.c (Ftry_completion, Fall_completions): Allow
>> both string and symbol keys in alists and hash tables.
>> 
>> Again I am not arguing for or against the desirability of this change,
>> I am trying to deal with its consequences.

> I changed them to support the following change:

> 2005-02-22  Kim F. Storm  <storm@cua.dk>

> 	* progmodes/hideif.el (hide-ifdef-use-define-alist):
> 	Use completing-read.  Suggested by Juan-Leon Lahoz Garcia.

Then I simply suggest the patch below.  Then we can revert your change and
forget about this idea of allowing symbols in completion lists.

I mean, honestly, why make the primitives try-completion, all-completions,
and test-completions yet more hairy for this one particular case, which is
not even an often used piece of code and where the workaround won't even
lead to any noticeable performance hit, seeing how hide-ifdef-define-alist
is unlikely to grow large.


        Stefan


--- hideif.el	04 avr 2005 09:53:32 -0400	1.50
+++ hideif.el	01 jui 2005 10:53:14 -0400	
@@ -960,7 +960,9 @@
   "Set `hide-ifdef-env' to the define list specified by NAME."
   (interactive
    (list (completing-read "Use define list: "
-			  hide-ifdef-define-alist nil t)))
+			  (mapcar (lambda (x) (symbol-name (car x)))
+                                  hide-ifdef-define-alist)
+                          nil t)))
   (if (stringp name) (setq name (intern name)))
   (let ((define-list (assoc name hide-ifdef-define-alist)))
     (if define-list

  reply	other threads:[~2005-07-01 14:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28  2:27 Bugs in newly added completion capabilities Luc Teirlinck
2005-06-28 18:47 ` Richard M. Stallman
2005-06-29  3:50   ` Luc Teirlinck
2005-06-29 20:43     ` Richard M. Stallman
2005-06-30  2:29       ` Luc Teirlinck
2005-06-30  7:48         ` Kim F. Storm
2005-06-30  7:50         ` Miles Bader
2005-06-30 12:51           ` Kim F. Storm
2005-06-30 17:19           ` Luc Teirlinck
2005-06-30 17:42           ` Stefan Monnier
2005-06-30 18:28             ` Luc Teirlinck
2005-06-30 19:42               ` Stefan Monnier
2005-07-01  8:14               ` Kim F. Storm
2005-07-01 14:59                 ` Stefan Monnier [this message]
2005-07-02 12:32                   ` Richard M. Stallman
2005-06-30 18:32             ` Luc Teirlinck
2005-06-30 19:43               ` Stefan Monnier
2005-07-01  4:03             ` Richard M. Stallman
2005-07-01  4:36               ` Miles Bader
2005-07-01  7:33                 ` David Kastrup
2005-07-01  7:55                   ` Miles Bader
2005-07-01  8:34                 ` Kim F. Storm
2005-07-01 22:45                   ` Richard M. Stallman
2005-07-01  8:30               ` Kim F. Storm
2005-06-30 21:29         ` Richard M. Stallman
2005-06-29  3:56   ` Luc Teirlinck

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=87br5mbmra.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=rms@gnu.org \
    --cc=teirllm@dms.auburn.edu \
    /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.