[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 208/299: Use TeX-electric-math in LaTeX-math-insert/cal.
From: |
Stefan Monnier |
Subject: |
[elpa] 208/299: Use TeX-electric-math in LaTeX-math-insert/cal. |
Date: |
Sun, 02 Nov 2014 03:11:29 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit d617398208ea2c98069c5d4b85f33cc787ac2c7d
Author: Mosè Giordano <address@hidden>
Date: Mon Jan 6 15:34:46 2014 +0100
Use TeX-electric-math in LaTeX-math-insert/cal.
* latex.el (LaTeX-math-insert): Use `TeX-electric-math' for
consistency with `TeX-insert-dollar'.
(LaTeX-math-cal): Ditto.
---
ChangeLog | 6 ++++++
latex.el | 18 +++++++++++-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0c376c4..f3573f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-06 Mos� Giordano <address@hidden>
+
+ * latex.el (LaTeX-math-insert): Use `TeX-electric-math' for
+ consistency with `TeX-insert-dollar'.
+ (LaTeX-math-cal): Ditto.
+
2013-12-24 Mos� Giordano <address@hidden>
* tex-style.el (LaTeX-fontspec-arg-font-search): New customizable
diff --git a/latex.el b/latex.el
index 5f6d194..684f36d 100644
--- a/latex.el
+++ b/latex.el
@@ -1,6 +1,6 @@
;;; latex.el --- Support for LaTeX documents.
-;; Copyright (C) 1991, 1993-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993-2014 Free Software Foundation, Inc.
;; Maintainer: address@hidden
;; Keywords: tex
@@ -4963,19 +4963,23 @@ commands are defined:
:type 'function)
(defun LaTeX-math-insert (string dollar)
- "Insert \\STRING{}. If DOLLAR is non-nil, put $'s around it."
- (if dollar (insert "$"))
+ "Insert \\STRING{}. If DOLLAR is non-nil, put $'s around it.
+If `TeX-electric-math' is non-nil wrap that symbols around the
+string."
+ (if dollar (insert (or (car TeX-electric-math) "$")))
(funcall LaTeX-math-insert-function string)
- (if dollar (insert "$")))
+ (if dollar (insert (or (cdr TeX-electric-math) "$"))))
(defun LaTeX-math-cal (char dollar)
- "Insert a {\\cal CHAR}. If DOLLAR is non-nil, put $'s around it."
+ "Insert a {\\cal CHAR}. If DOLLAR is non-nil, put $'s around it.
+If `TeX-electric-math' is non-nil wrap that symbols around the
+char."
(interactive "*c\nP")
- (if dollar (insert "$"))
+ (if dollar (insert (or (car TeX-electric-math) "$")))
(if (member "latex2e" (TeX-style-list))
(insert "\\mathcal{" (char-to-string char) "}")
(insert "{\\cal " (char-to-string char) "}"))
- (if dollar (insert "$")))
+ (if dollar (insert (or (cdr TeX-electric-math) "$"))))
;;; Folding
- [elpa] 192/299: Revert "Distinguish common and advanced macros/envs.", (continued)
- [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, 2014/11/01
- [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 <=
- [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
- [elpa] 203/299: Skip comment or file in parens in output., Stefan Monnier, 2014/11/01
- [elpa] 211/299: Adapt style/babel.el to babel 3.9., Stefan Monnier, 2014/11/01
- [elpa] 210/299: Make search for \begin and \end case sensitive., Stefan Monnier, 2014/11/01
- [elpa] 214/299: Fix syntactic fontification., Stefan Monnier, 2014/11/01
- [elpa] 215/299: Declare LaTeX-shortvrb-chars as safe local variable., Stefan Monnier, 2014/11/01
- [elpa] 212/299: Distinguish between numbered and unnumbered sections., Stefan Monnier, 2014/11/01
- [elpa] 216/299: Add a ^L so that the file local variable example isn't picked up., Stefan Monnier, 2014/11/01