emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 53/299: * doc/auctex.texi (Quotes): Document `TeX-math-close-sing


From: Stefan Monnier
Subject: [elpa] 53/299: * doc/auctex.texi (Quotes): Document `TeX-math-close-single-dollar'. (Selecting a Command): Remove reference to `LaTeX-biblatex-use-Biber'. (Parsing Files): Document `LaTeX-auto-index-regexp-list', `LaTeX-auto-class-regexp-list', `LaTeX-auto-pagestyle-regexp-list', `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list', `LaTeX-auto-savebox-regexp-list'.
Date: Sun, 02 Nov 2014 03:10:14 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit bc6aa9f7ed6d1e1c342d218b97f30e82b6cd84f7
Author: Tassilo Horn <address@hidden>
Date:   Wed Feb 13 20:10:27 2013 +0000

    * doc/auctex.texi (Quotes): Document
    `TeX-math-close-single-dollar'.
    (Selecting a Command): Remove reference to
    `LaTeX-biblatex-use-Biber'.
    (Parsing Files): Document `LaTeX-auto-index-regexp-list',
    `LaTeX-auto-class-regexp-list',
    `LaTeX-auto-pagestyle-regexp-list',
    `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list',
    `LaTeX-auto-savebox-regexp-list'.
    
    * tex.el (TeX-math-close-single-dollar): New variable.
    (TeX-insert-dollar): Use it.
---
 ChangeLog       |   15 +++++++++++++++
 doc/auctex.texi |   53 +++++++++++++++++++++++++++++++++++++++++++++--------
 tex.el          |   20 ++++++++++++++++++--
 3 files changed, 78 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 948f3dc..92edbc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-02-13  Mos´┐Ż Giordano  <address@hidden>
+
+       * doc/auctex.texi (Quotes): Document
+       `TeX-math-close-single-dollar'.
+       (Selecting a Command): Remove reference to
+       `LaTeX-biblatex-use-Biber'.
+       (Parsing Files): Document `LaTeX-auto-index-regexp-list',
+       `LaTeX-auto-class-regexp-list',
+       `LaTeX-auto-pagestyle-regexp-list',
+       `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list',
+       `LaTeX-auto-savebox-regexp-list'.
+
+       * tex.el (TeX-math-close-single-dollar): New variable.
+       (TeX-insert-dollar): Use it.
+
 2013-02-13  Tassilo Horn  <address@hidden>
 
        * Makefile.in (STYLESRC): Activate new style filecontents.el.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index d16b611..309f3c7 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -397,10 +397,10 @@ language-specific ones.
 
 In @AUCTeX{}, dollar signs should match like they do in @TeX{}.  This
 has been partially implemented, we assume dollar signs always match
-within a paragraph.  The first @samp{$} you insert in a paragraph will
-do nothing special.  The second @samp{$} will match the first.  This
-will be indicated by moving the cursor temporarily over the first dollar
-sign.
+within a paragraph.  By default, the first @samp{$} you insert in a
+paragraph will do nothing special.  The second @samp{$} will match the
+first.  This will be indicated by moving the cursor temporarily over the
+first dollar sign.
 
 @deffn Command TeX-insert-dollar @var{arg}
 @kindex $
@@ -410,6 +410,11 @@ Show matching dollar sign if this dollar sign end the 
@TeX{} math mode.
 Ensure double dollar signs match up correctly by inserting extra dollar
 signs when needed if @code{TeX-math-close-double-dollar} is non-nil.
 
+If @var{TeX-math-close-single-dollar} is non-nil, when outside math mode
+the function insert the opening and closing dollar signs for @TeX{}
+inline formula and put the point between them just by typing a single
address@hidden
+
 With optional @var{arg}, insert that many dollar signs.
 @end deffn
 
@@ -422,6 +427,14 @@ double dollar sign @samp{$$} @AUCTeX{} will automatically 
insert two
 dollar signs.
 @end defopt
 
address@hidden TeX-math-close-single-dollar
+Control the insertion of dollar signs for delimiting inline math.  If
+the variable is non-nil and you enter a dollar sign outside math mode
address@hidden will automatically insert the opening and closing dollar signs
+and put the point between them.  If the variable
address@hidden is non-nil the opening dollar will blink.
address@hidden defopt
+
 @subheading Braces
 
 To avoid unbalanced braces, it is useful to insert them pairwise.  You
@@ -2420,11 +2433,11 @@ The default command to run in this buffer.  Must be an 
entry in
 
 @cindex Biber
 @cindex biblatex
address@hidden LaTeX-biblatex-use-Biber
 In case you use biblatex in a document, @AUCTeX{} switches from
address@hidden to Biber for bibliography processing.  In case you want to
-keep using address@hidden, set the variable @code{LaTeX-biblatex-use-Biber}
-to nil.
address@hidden to Biber for bibliography processing.  If you have enabled
+automatic parsing, @AUCTeX{} checks the value of @samp{backend} option
+given to biblatex at load time to decide whether to use address@hidden or
+Biber.
 
 After confirming a command to execute, @AUCTeX{} will try to save any
 buffers related to the document, and check if the document needs to be
@@ -3232,6 +3245,30 @@ Only parse @LaTeX{} class and packages.
 Only parse @LaTeX{} labels.
 @end defvr
 
address@hidden Constant LaTeX-auto-index-regexp-list
+Only parse @LaTeX{} index and glossary entries.
address@hidden defvr
+
address@hidden Constant LaTeX-auto-class-regexp-list
+Only parse macros in @LaTeX{} classes and packages.
address@hidden defvr
+
address@hidden Constant LaTeX-auto-pagestyle-regexp-list
+Only parse @LaTeX{} pagestyles.
address@hidden defvr
+
address@hidden Constant LaTeX-auto-counter-regexp-list
+Only parse @LaTeX{} counters.
address@hidden defvr
+
address@hidden Constant LaTeX-auto-length-regexp-list
+Only parse @LaTeX{} lengths.
address@hidden defvr
+
address@hidden Constant LaTeX-auto-savebox-regexp-list
+Only parse @LaTeX{} saveboxes.
address@hidden defvr
+
 @defvr Constant LaTeX-auto-regexp-list
 Parse common @LaTeX{} commands.
 @end defvr
diff --git a/tex.el b/tex.el
index c2af20d..4660f47 100644
--- a/tex.el
+++ b/tex.el
@@ -5110,6 +5110,13 @@ See also `TeX-font-replace' and 
`TeX-font-replace-function'."
   :group 'TeX-macro
   :type 'boolean)
 
+(defcustom TeX-math-close-single-dollar nil
+  "If non-nil, when outside math mode insert opening and closing dollar
+signs for TeX inline equation and put the point between them, just by
+typing a single `$'."
+  :group 'TeX-macro
+  :type 'boolean)
+
 (defun TeX-insert-dollar (&optional arg)
   "Insert dollar sign.
 
@@ -5148,7 +5155,7 @@ sign.  With optional ARG, insert that many dollar signs."
            (save-excursion
              (goto-char (cdr texmathp-why))
              (if (pos-visible-in-window-p)
-                 (sit-for 1)
+                 (sit-for blink-matching-delay)
                (message "Matches %s"
                         (buffer-substring
                          (point) (progn (end-of-line) (point))))))))
@@ -5158,7 +5165,16 @@ sign.  With optional ARG, insert that many dollar signs."
       (insert "$")))
    (t
     ;; Just somewhere in the text.
-    (insert "$")))
+    (if TeX-math-close-single-dollar
+       (progn
+         (insert "$$")
+         (if blink-matching-paren
+             (progn
+               (backward-char 2)
+               (sit-for blink-matching-delay)
+               (forward-char))
+           (backward-char)))
+      (insert "$"))))
   (TeX-math-input-method-off))
 
 (defvar TeX-math-input-method-off-regexp



reply via email to

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