emacs-devel
[Top][All Lists]
Advanced

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

Re: Bugs in newly added completion capabilities.


From: Stefan Monnier
Subject: Re: Bugs in newly added completion capabilities.
Date: Fri, 01 Jul 2005 10:59:46 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> since the following change made relatively recently (I thought we were
>> in a feature freeze, but anyway):
>> 
>> 2005-02-22  Kim F. Storm  <address@hidden>
>> 
>> * 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  <address@hidden>

>       * 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 via email to

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