[Top][All Lists]

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

Re: [AUCTeX-devel] Re: Make TeX-insert-macro behave intelligently on \us

From: Arne Jørgensen
Subject: Re: [AUCTeX-devel] Re: Make TeX-insert-macro behave intelligently on \usepackage
Date: Tue, 11 Oct 2005 16:26:49 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

>> That's actually what I have at the moment.
>> (if (fboundp 'completing-read-multiple)
>>     (defalias 'TeX-completing-read-multiple 'completing-read-multiple)
>>   (defun TeX-completing-read-multiple
>>     (prompt table &optional predicate require-match initial-input
>>            hist def inherit-input-method)
>>     "Poor mans implementation of Emacs' `completing-read-multiple' for 
>> XEmacs."
>>     (require 'multi-prompt)
>>     (multi-prompt "," nil prompt table predicate require-match initial-input 
>> hist)))
> Not quite the same.  Don't use "require" in functions.  It is a
> permanent performance hog when compared to calling an autoload, and it
> does not make the byte compiler happy.

Thanks. I didn't know that.

It is not necessary anyway since multi-prompt is in auto-loads.el.

>> I just dicovered a difference in `multi-prompt' and `crm'.  If the
>> second argument of `multi-prompt' is non-nil the values you are
>> completing on are supposed to be unique and there is no way to
>> specify that in `completing-read-multiple' so we cannot replace the
>> two occurences of `multi-prompt' in latex.el with
>> `completing-read-multiple' without loosing that.
> What is the user-visible difference in behavior?

If one possible completion is "foo" you cannot complete on it more
than once (i.e. "foo,Co<TAB>") if `multi-prompt' is called with unique
set to non-nil. It still possible to enter it
though. `completing-read-multiple' cannot restrict the completion in
that way. Both calls of `multi-prompt' in latex.el uses unique.

Kind regards,

Arne Jørgensen <>

reply via email to

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