[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 283/299: Document TeX-add-style-hook's new 3rd argument.
From: |
Stefan Monnier |
Subject: |
[elpa] 283/299: Document TeX-add-style-hook's new 3rd argument. |
Date: |
Sun, 02 Nov 2014 03:11:59 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 25887f8f74710cf927fc91592ff9d347c0432a07
Author: Vincent Belaïche <address@hidden>
Date: Sun Sep 14 11:20:55 2014 +0200
Document TeX-add-style-hook's new 3rd argument.
* latex.el (LaTeX-dialect): Correct doctstring for consistency
with definition of function TeX-add-style-hook.
* doc/auctex.texi (Simple Style): modify example with
'TeX-add-style-hook', so that 3rd argument is added. Modify @defun
of 'TeX-add-style-hook' also to document addition of 3rd argument.
Signed-off-by: Tassilo Horn <address@hidden>
---
ChangeLog | 9 +++++++++
doc/auctex.texi | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
latex.el | 5 +++--
3 files changed, 64 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a5c842e..ca4d1e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-09-13 Vincent Bela�che <address@hidden>
+
+ * latex.el (LaTeX-dialect): Correct doctstring for consistency
+ with definition of function TeX-add-style-hook.
+
+ * doc/auctex.texi (Simple Style): modify example with
+ 'TeX-add-style-hook', so that 3rd argument is added. Modify @defun
+ of 'TeX-add-style-hook' also to document addition of 3rd argument.
+
2014-09-11 Vincent Bela�che <address@hidden>
* doc/changes.texi: Add information about style hook labelling by
dialect.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 84ac235..08bf8cf 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4269,7 +4269,8 @@ Here is a simple example of a style file.
(TeX-add-style-hook
"book"
(lambda ()
- (LaTeX-largest-level-set "chapter")))
+ (LaTeX-largest-level-set "chapter"))
+ LaTeX-dialect)
@end lisp
The example is from the @AUCTeX{} sources and is loaded for any @LaTeX{}
@@ -4288,11 +4289,59 @@ hooks will be called for each buffer using the style
file.
Note that the basename of the style file and the name of the style hook
should usually be identical.
address@hidden TeX-add-style-hook @var{style} @var{hook}
address@hidden TeX-add-style-hook @var{style} @var{hook} &optional
@var{dialect-expr}
Add @var{hook} to the list of functions to run when we use the @TeX{}
-file @var{style}.
+file @var{style} and the current dialect is one in the set derived from
address@hidden When @var{dialect-expr} is omitted, then @var{hook}
+is allowed to be run whatever the current dialect is.
+
address@hidden may be one of:
+
address@hidden
address@hidden
+A symbol indicating a singleton containing one basic @TeX{} dialect,
+this symbol shall be selected among:
address@hidden @code
address@hidden :latex
+For all files in @LaTeX{} mode, or any mode derived thereof
address@hidden :bibtex
+For all files in address@hidden mode, or any mode derived thereof
address@hidden :texinfo
+For all files in @acronym{Texinfo} mode.
address@hidden table
address@hidden
+A logical expression like:
address@hidden @code
address@hidden (or @var{dialect-expression1} @dots{} @address@hidden)
+For union of the sets of dialects corresponding to @var{dialect-expression1}
+through @address@hidden
address@hidden (and @var{dialect-expression1} @dots{} @address@hidden)
+For intersection of the sets of dialects corresponding to
address@hidden through @address@hidden
address@hidden (nor @var{dialect-expression1} @dots{} @address@hidden)
+For complement of the union sets of dialects corresponding to
address@hidden through @address@hidden
+relatively to the set of all supported dialects
address@hidden (not @var{dialect-expr})
+For complement set of dialect corresponding to @var{dialect-expr}
+relatively to the set of all supported dialects
address@hidden table
address@hidden itemize
+
@end defun
+In case of adding a style hook for @LaTeX{}, when calling function
address@hidden it is thought more futureproof for argument
address@hidden to pass constant @code{LaTeX-dialect} currently
+defined to @code{:latex}, rather than passing @code{:latex} directly.
+
address@hidden Constant LaTeX-dialect
+Default dialect for use with function @code{TeX-add-style-hook} for
+argument @var{dialect-expr} when the hook is to be run only on LaTeX
+file, or any mode derived thereof.
address@hidden defvr
+
+
@node Adding Macros
@subsection Adding Support for Macros
@cindex Adding macros
diff --git a/latex.el b/latex.el
index 2cd2b65..32a431f 100644
--- a/latex.el
+++ b/latex.el
@@ -4537,8 +4537,9 @@ use \\[customize]."
(defconst LaTeX-dialect :latex
"Default dialect for use with function `TeX-add-style-hook' for
- argument DIALECT when the hook is to be run only on LaTeX file,
- or any mode derived thereof. See variable `TeX-style-hook-dialect'." )
+argument DIALECT-EXPR when the hook is to be run only on LaTeX
+file, or any mode derived thereof. See variable
+`TeX-style-hook-dialect'." )
(defconst LaTeX-math-default
'((?a "alpha" "Greek Lowercase" 945) ;; #X03B1
- [elpa] 271/299: Keep error overview window if View command is run., (continued)
- [elpa] 271/299: Keep error overview window if View command is run., Stefan Monnier, 2014/11/01
- [elpa] 275/299: Font-lock fix for verbatim environment args., Stefan Monnier, 2014/11/01
- [elpa] 274/299: Adapt mathtools.el to latest amsmath.el changes., Stefan Monnier, 2014/11/01
- [elpa] 270/299: Manage auto insertion of labels., Stefan Monnier, 2014/11/01
- [elpa] 272/299: Rename LaTeX-auto-insert-label and document its use for sections., Stefan Monnier, 2014/11/01
- [elpa] 277/299: Change Vincent's email address in ChangeLog., Stefan Monnier, 2014/11/01
- [elpa] 268/299: Add customizable option for default date format., Stefan Monnier, 2014/11/01
- [elpa] 273/299: Change again method to determine whether a label should be inserted., Stefan Monnier, 2014/11/01
- [elpa] 266/299: Auto insertion of ampersands., Stefan Monnier, 2014/11/01
- [elpa] 280/299: Bugfix in file name expansion., Stefan Monnier, 2014/11/01
- [elpa] 283/299: Document TeX-add-style-hook's new 3rd argument.,
Stefan Monnier <=
- [elpa] 279/299: Add test for the %` expander., Stefan Monnier, 2014/11/01
- [elpa] 281/299: Remove defalias docstring arg., Stefan Monnier, 2014/11/01
- [elpa] 278/299: Fix the expansion of %' in TeX-expand-list., Stefan Monnier, 2014/11/01
- [elpa] 286/299: Rename LaTeX-amstext-package-option to LaTeX-amstext-package-options., Stefan Monnier, 2014/11/01
- [elpa] 285/299: Use `push-mark' instead of `set-mark'., Stefan Monnier, 2014/11/01
- [elpa] 284/299: Fix \end buffer position passed to hooks., Stefan Monnier, 2014/11/01
- [elpa] 290/299: Fix LaTeX-newline when comment-auto-fill-only-comments is non-nil., Stefan Monnier, 2014/11/01
- [elpa] 287/299: Docstring fix., Stefan Monnier, 2014/11/01
- [elpa] 276/299: Code cleanup and optimizations., Stefan Monnier, 2014/11/01
- [elpa] 288/299: Avoid duplicate marks in TeX-insert-dollar., Stefan Monnier, 2014/11/01