[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 20:31:21 +0100 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Hi all,
I've now implemented a better approach. Style file authors can now mark
macros and environments as expert commands using
(TeX-declare-expert-macros
'("command1" . "mystyle")
'("command2" . "mystyle")
...)
(LaTeX-declare-expert-environments
'("env1" . "mystyle")
'("env1" . "mystyle")
...)
Users can control if they want the completion to include expert
macros/envs with `TeX-complete-expert-commands' which can be nil
(default), t, or a list of package names whose expert macros/envs should
be complete.
Expert commands are stored in hash-tables
TeX-expert-macro-table
LaTeX-expert-environment-table
and the functions
TeX-symbol-list-filtered
LaTeX-environment-list-filtered
filter their un"-filtered" counterparts by what's defined by
`TeX-complete-expert-commands'. The completion functions now usually
use the *-filtered functions except for `TeX-arg-macro',
`TeX-arg-define-macro', `TeX-arg-environment', and
`TeX-arg-define-environment', because AFAICS those are mostly used for
stuff like \renewcommand etc., and there I think it's more appropriate
to complete everything...
Even if \foobar was declared an expert command and a user doesn't
include those in completion, C-c RET foobar RET will still use the
argument completion as declared by (TeX-add-symbols '("foobar" ...)).
The only thing that I haven't managed to implement until now is a way to
_temporary_ enable expert commands for one single completion, because
prefix args are already used differently by `TeX-insert-macro' and
`LaTeX-environment'.
Bye,
Tassilo
- Re: [AUCTeX-devel] auctex-devel Digest, Vol 103, Issue 2, Mads Jensen, 2013/11/05
- [AUCTeX-devel] About commonly used and "expert" macros/environments (was: auctex-devel Digest, Vol 103, Issue 2), Tassilo Horn, 2013/11/06
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments (was: auctex-devel Digest, Vol 103, Issue 2), Mosè Giordano, 2013/11/06
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Tassilo Horn, 2013/11/07
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, David Kastrup, 2013/11/07
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Tassilo Horn, 2013/11/08
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, David Kastrup, 2013/11/08
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Tassilo Horn, 2013/11/08
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, David Kastrup, 2013/11/08
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Tassilo Horn, 2013/11/08
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments,
Tassilo Horn <=
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Tassilo Horn, 2013/11/09
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Mosè Giordano, 2013/11/09
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Tassilo Horn, 2013/11/09
- Re: [AUCTeX-devel] About commonly used and "expert" macros/environments, Mosè Giordano, 2013/11/09