auctex-devel
[Top][All Lists]
Advanced

[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: David Kastrup
Subject: Re: [AUCTeX-devel] Re: Make TeX-insert-macro behave intelligently on \usepackage
Date: Tue, 11 Oct 2005 16:14:03 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Arne Jørgensen <address@hidden> writes:

> David Kastrup <address@hidden> skriver:
>
>> Seems like we have a communication problem.  My proposal was to
>> replace the currect calls to multi-prompt to a wrapper function call.
>> This wrapper function is defined at load-time, depending on whether
>> the crm functions are fboundp, to either use crm or multiprompt.  In
>> case multiprompt was used, appropriate autoloads would be defined.
>
> OK. Then I didn't understand you right. Sorry.
>
>> Something like
>>
>> (if (fboundp 'some-crm-function)
>>     (defun TeX-prompt-whatever (... (some-crm-function ...)))
>>   (autoload 'some-multiprompt-function 'multiprompt)
>>   (defun TeX-prompt-whatever (... (some-multiprompt-function ...))))
>
> 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.

> 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?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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