auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] About commonly used and "expert" macros/environments


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] About commonly used and "expert" macros/environments
Date: Fri, 08 Nov 2013 10:57:30 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

David Kastrup <address@hidden> writes:

>>   (when (TeX-add-advanced-macros/envs-p "packagename")
>>     (TeX-add-symbols ...)
>>     (LaTeX-add-environments ...))
>
> Uh, that interface does not seem to offer restrained completion (where
> some commands are offered for completion only when no "ordinary"
> commands fit completion any more).

Yes, I know.  Admittedly, it's a poor-man's solution.

> Worse, it does nothing for making restrained completion implementable
> at a latter point of time.

On the other hand, it doesn't make it any harder, too.  Anyway, I've
reverted the changes.

How about that: The arguments given to `TeX-add-symbols' and
`LaTeX-add-environments' may also have the form

  '(:pkg-name "foobar" <argspec as before>)

with the meaning that foobar is an advanced macro/env of pkg-name.  Like
with my previous patch, there would be a user option being a list of
packages from which a user also wants to complete the advanced commands.

Then `TeX-complete-symbol', `TeX-insert-macro', and `LaTeX-environment'
would need to be adapted to complete foobar only if

  (1) the user has that advanced-stuff-list-option set to t or to a list
      containing :pkg-name, or

  (2) there are no other completions matching the current user input.

Does that sound reasonable?  (Of course, all other usages of
`TeX-symbol-list' and `LaTeX-environment-list' would need to be checked
and maybe adapted, too.)

Bye,
Tassilo




reply via email to

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