Arne Jørgensen <[EMAIL PROTECTED]> writes:

> David Kastrup <[EMAIL PROTECTED]> 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


_______________________________________________
auctex-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to