[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 195/299: Better signature of expert declaration functions.
From: |
Stefan Monnier |
Subject: |
[elpa] 195/299: Better signature of expert declaration functions. |
Date: |
Sun, 02 Nov 2014 03:11:24 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 1d4c4b7d8c797497662dbd2532e406200c570f00
Author: Tassilo Horn <address@hidden>
Date: Sat Nov 9 10:23:59 2013 +0100
Better signature of expert declaration functions.
* tex.el (TeX-complete-make-expert-command-functions): Change
signature of declare-expert functions.
* doc/auctex.texi: Document it.
---
ChangeLog | 10 +++++++++-
doc/auctex.texi | 16 ++++------------
tex.el | 25 ++++++++++---------------
3 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6a4bfbe..0332a04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-09 Tassilo Horn <address@hidden>
+
+ * tex.el (TeX-complete-make-expert-command-functions): Change
+ signature of declare-expert functions.
+
+ * doc/auctex.texi: Document it.
+
2013-11-08 Tassilo Horn <address@hidden>
* tex.el (TeX-complete-expert-commands): New defcustom.
@@ -6,7 +13,8 @@
`TeX-complete-expert-commands'.
(VirTeX-common-initialization): Ditto.
- * latex.el (LaTeX-environment, LaTeX-common-initialization):
+ * latex.el (LaTeX-environment, LaTeX-common-initialization):
+ Restrict completion depending on `TeX-complete-expert-commands'.
* tex-info.el (TeX-texinfo-mode): Restrict completion depending on
`TeX-complete-expert-commands'.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 6ebb22c..aa5387c 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4403,12 +4403,8 @@ Some packages provide macros that are rarely useful to
non-expert users.
Those should be marked as expert macros using
@code{TeX-declare-expert-macros}.
address@hidden TeX-declare-expert-macros @var{pairs}...
-Declare the macros in PAIRS as expert macros.
-
-Each entry in PAIRS has the form (MACRO . STYLE), declaring MACRO
-to be an expert macro provided by STYLE. If STYLE is nil,
-declare MACRO to be non-expert.
address@hidden TeX-declare-expert-macros @var{style} @var{macros}...
+Declare MACROS as expert macros of STYLE.
Expert macros are completed depending on `TeX-complete-expert-commands'.
@end defun
@@ -4556,12 +4552,8 @@ Some packages provide environments that are rarely
useful to non-expert
users. Those should be marked as expert environments using
@code{LaTeX-declare-expert-environments}.
address@hidden LaTeX-declare-expert-environments @var{pairs}...
-Declare the environments in PAIRS as expert environments.
-
-Each entry in PAIRS has the form (ENVIRONMENT . STYLE), declaring ENVIRONMENT
-to be an expert environment provided by STYLE. If STYLE is nil,
-declare ENVIRONMENT to be non-expert.
address@hidden LaTeX-declare-expert-environments @var{style}
@var{ENVIRONMENTS}...
+Declare ENVIRONMENTS as expert environments of STYLE.
Expert environments are completed depending on `TeX-complete-expert-commands'.
@end defun
diff --git a/tex.el b/tex.el
index 58fef46..fc31c1d 100644
--- a/tex.el
+++ b/tex.el
@@ -2529,8 +2529,9 @@ Possible values are nil, t, or a list of style names.
(repeat :tag "Complete expert commands of certain styles"
string)))
(defmacro TeX-complete-make-expert-command-functions (thing list-var prefix)
- (let ((plural (concat thing "s"))
- (upcase (upcase thing)))
+ (let* ((plural (concat thing "s"))
+ (upcase (upcase thing))
+ (upcase-plural (upcase plural)))
`(progn
(defvar ,(intern (format "%s-expert-%s-table" prefix thing))
(make-hash-table :test 'equal)
@@ -2539,21 +2540,15 @@ Possible values are nil, t, or a list of style names.
A %s occuring in this table is considered an expert %s and
treated specially in the completion." thing thing thing))
- (defun ,(intern (format "%s-declare-expert-%s" prefix plural)) (&rest
pairs)
- ,(format "Declare the %s in PAIRS as expert %s.
-
-Each entry in PAIRS has the form (%s . STYLE), declaring %s
-to be an expert %s provided by STYLE. If STYLE is nil,
-declare %s to be non-expert.
+ (defun ,(intern (format "%s-declare-expert-%s" prefix plural)) (style
&rest ,(intern plural))
+ ,(format "Declare %s as expert %s of STYLE.
Expert %s are completed depending on `TeX-complete-expert-commands'."
- plural plural upcase upcase thing upcase plural)
- (dolist (entry pairs)
- (let ((macro (car entry))
- (style (cdr entry)))
- (if (null style)
- (remhash macro TeX-expert-macro-table)
- (puthash macro style TeX-expert-macro-table)))))
+ upcase-plural plural plural)
+ (dolist (x ,(intern plural))
+ (if (null style)
+ (remhash x TeX-expert-macro-table)
+ (puthash x style TeX-expert-macro-table))))
(defun ,(intern (format "%s-filtered" list-var)) ()
,(format "Return (%s) filtered depending on
`TeX-complete-expert-commands'."
- [elpa] 190/299: Document missing folding variables., (continued)
- [elpa] 190/299: Document missing folding variables., Stefan Monnier, 2014/11/01
- [elpa] 193/299: void-function error fix., Stefan Monnier, 2014/11/01
- [elpa] 184/299: Mention new tabular indentation in changes.texi., Stefan Monnier, 2014/11/01
- [elpa] 185/299: Add completion for ProvidesPackage, ProvidesClass, and ProvidesFile., Stefan Monnier, 2014/11/01
- [elpa] 198/299: Declare expert macros and envs in biblatex style file., Stefan Monnier, 2014/11/01
- [elpa] 194/299: Distinguish normal and expert macros/envs., Stefan Monnier, 2014/11/01
- [elpa] 196/299: * bib-cite.el (bib-highlight-mouse): Change regexp to cope with multiple optional arguments of a macro., Stefan Monnier, 2014/11/01
- [elpa] 192/299: Revert "Distinguish common and advanced macros/envs.", Stefan Monnier, 2014/11/01
- [elpa] 197/299: Fix C-x ` (next-error) for compile commands., Stefan Monnier, 2014/11/01
- [elpa] 200/299: Fix of the fix, my fault., Stefan Monnier, 2014/11/01
- [elpa] 195/299: Better signature of expert declaration functions.,
Stefan Monnier <=
- [elpa] 204/299: Revert "Skip comment or file in parens in output.", Stefan Monnier, 2014/11/01
- [elpa] 201/299: Disable electric-pair-mode., Stefan Monnier, 2014/11/01
- [elpa] 191/299: Distinguish common and advanced macros/envs., Stefan Monnier, 2014/11/01
- [elpa] 207/299: Add font name completion in fontspec.el., Stefan Monnier, 2014/11/01
- [elpa] 202/299: Disable electric-pair-mode conditionally., Stefan Monnier, 2014/11/01
- [elpa] 205/299: Handle package messages with parenthesized text., Stefan Monnier, 2014/11/01
- [elpa] 208/299: Use TeX-electric-math in LaTeX-math-insert/cal., Stefan Monnier, 2014/11/01
- [elpa] 199/299: Fix bindings of narrowing functions., Stefan Monnier, 2014/11/01
- [elpa] 209/299: Fix a bug with reftex where tex-info and LaTeX interferred., Stefan Monnier, 2014/11/01
- [elpa] 206/299: New style files and a fix to imakeidx.el., Stefan Monnier, 2014/11/01