[Top][All Lists]

[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: Thu, 07 Nov 2013 20:54:33 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Mosè Giordano <address@hidden> writes:

>> But I'm not sure which way to tackle that.  The cheapest
>> solution was to have a new defcustom `TeX-include-advanced-macros/envs'
>> which would either be t (include all commands) or a list of package
>> names whose advanced commands to include.  Then we also had a function
>> (defun TeX-include-advanced-macros/envs-p (style)
>>   (cond
>>    ((null TeX-include-advanced-macros/envs) nil)
>>    ((listp TeX-include-advanced-macros/envs)
>>     (member style TeX-include-advanced-macros/envs))
>>    (t t)))
>> Using that, style files could do:
>>   ;; The commonly used macros and environments
>>   (TeX-add-symbols ...)
>>   (LaTeX-add-environments ...)
>>   ;; The stuff only expert users of a package will use
>>   (when (TeX-include-advanced-macros/envs "this-style")
>>     (TeX-add-symbols ...)
>>     (LaTeX-add-environments ...))
>> Does that sound reasonable to anyone?  If noone objects, I'll
>> implement it that way.
> Your suggestion looks good to me, I didn't manage to come up with a
> better solution.

Ok, I've implemented that.  I also added docs to the manual, both for
users as well as for style file authors.

In contrast to the above, I've decided to name the variable/predicate
"TeX-add-" instead of "TeX-include-".

So Mads, now I'm happy to accept all your patches that add missing
macros/environments, but please wrap those that can be identified as
"rarely used/useful" or "only for experts" by looking at the docs like

  (when (TeX-add-advanced-macros/envs-p "packagename")
    (TeX-add-symbols ...)
    (LaTeX-add-environments ...))


reply via email to

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