[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 63bcbcd 08/26: Obsolete LaTeX-verbatim-regexp defcustom
From: |
Tassilo Horn |
Subject: |
[elpa] elpa 63bcbcd 08/26: Obsolete LaTeX-verbatim-regexp defcustom |
Date: |
Tue, 27 Jan 2015 12:11:12 +0000 |
branch: elpa
commit 63bcbcd1f6aae29b8c53d7a703fb0e5f92be0701
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Obsolete LaTeX-verbatim-regexp defcustom
* latex.el (LaTeX-verbatim-regexp): Make variable obsolete.
(LaTeX-verbatim-regexp): New function which computes a regexp of
verbatim environments from LaTeX-verbatim-environments.
(LaTeX-indent-calculate, LaTeX-indent-calculate-last): Use the
function LaTeX-verbatim-regexp instead of the variable.
* style/listings.el ("listings"): Don't modify the now obsolete
LaTeX-verbatim-regexp.
* style/fancyvrb.el ("fancyvrb"): Don't modify the now obsolete
LaTeX-verbatim-regexp.
* style/beamer.el ("beamer"): Don't modify the now obsolete
LaTeX-verbatim-regexp.
* style/alltt.el ("alltt"): Don't modify the now obsolete
LaTeX-verbatim-regexp.
---
ChangeLog | 17 +++++++++++++++++
latex.el | 14 ++++++++++----
style/alltt.el | 2 --
style/beamer.el | 4 +---
style/fancyvrb.el | 6 +-----
style/listings.el | 4 +---
6 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9bd0dae..735d8d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,23 @@
* latex.el (LaTeX-env-args): Bind exit-mark if its not bound
already.
+ (LaTeX-verbatim-regexp): Make variable obsolete.
+ (LaTeX-verbatim-regexp): New function which computes a regexp of
+ verbatim environments from LaTeX-verbatim-environments.
+ (LaTeX-indent-calculate, LaTeX-indent-calculate-last): Use the
+ function LaTeX-verbatim-regexp instead of the variable.
+
+ * style/listings.el ("listings"): Don't modify the now obsolete
+ LaTeX-verbatim-regexp.
+
+ * style/fancyvrb.el ("fancyvrb"): Don't modify the now obsolete
+ LaTeX-verbatim-regexp.
+
+ * style/beamer.el ("beamer"): Don't modify the now obsolete
+ LaTeX-verbatim-regexp.
+
+ * style/alltt.el ("alltt"): Don't modify the now obsolete
+ LaTeX-verbatim-regexp.
2014-12-18 Tassilo Horn <address@hidden>
diff --git a/latex.el b/latex.el
index 1098601..8b19c8b 100644
--- a/latex.el
+++ b/latex.el
@@ -2914,6 +2914,8 @@ indentation level in columns."
"*Regexp matching environments with indentation at col 0 for begin/end."
:group 'LaTeX-indentation
:type 'regexp)
+(make-obsolete-variable 'LaTeX-verbatim-regexp
'LaTeX-verbatim-environments-local
+ "2014-12-19")
(defcustom LaTeX-begin-regexp "begin\\b"
"*Regexp matching macros considered begins."
@@ -3045,6 +3047,10 @@ Lines starting with an item is given an extra
indentation of
(delete-region (line-beginning-position) (point))
(indent-to outer-indent))
+(defun LaTeX-verbatim-regexp ()
+ "Calculate the verbatim env regex from `LaTeX-verbatim-environments'."
+ (regexp-opt (LaTeX-verbatim-environments)))
+
(defun LaTeX-indent-calculate (&optional force-type)
"Return the indentation of a line of LaTeX source.
FORCE-TYPE can be used to force the calculation of an inner or
@@ -3076,7 +3082,7 @@ outer indentation in case of a commented line. The
symbols
(nth 1 entry)))
((looking-at (concat (regexp-quote TeX-esc)
"\\(begin\\|end\\){\\("
- LaTeX-verbatim-regexp
+ (LaTeX-verbatim-regexp)
"\\)}"))
;; \end{verbatim} must be flush left, otherwise an unwanted
;; empty line appears in LaTeX's output.
@@ -3208,19 +3214,19 @@ outer indentation in case of a commented line. The
symbols
0)
((looking-at (concat (regexp-quote TeX-esc)
"begin *{\\("
- LaTeX-verbatim-regexp
+ (LaTeX-verbatim-regexp)
"\\)}"))
0)
((looking-at (concat (regexp-quote TeX-esc)
"end *{\\("
- LaTeX-verbatim-regexp
+ (LaTeX-verbatim-regexp)
"\\)}"))
;; If I see an \end{verbatim} in the previous line I skip
;; back to the preceding \begin{verbatim}.
(save-excursion
(if (re-search-backward (concat (regexp-quote TeX-esc)
"begin *{\\("
- LaTeX-verbatim-regexp
+ (LaTeX-verbatim-regexp)
"\\)}") 0 t)
(LaTeX-indent-calculate-last force-type)
0)))
diff --git a/style/alltt.el b/style/alltt.el
index e5c5684..86b4993 100644
--- a/style/alltt.el
+++ b/style/alltt.el
@@ -37,8 +37,6 @@
(make-local-variable 'LaTeX-indent-environment-list)
(add-to-list 'LaTeX-indent-environment-list
'("alltt" current-indentation))
- (make-local-variable 'LaTeX-verbatim-regexp)
- (setq LaTeX-verbatim-regexp (concat LaTeX-verbatim-regexp "\\|alltt"))
(add-to-list 'LaTeX-verbatim-environments-local "alltt")
;; Fontification
(when (and (featurep 'font-latex)
diff --git a/style/beamer.el b/style/beamer.el
index 16c1f4b..58bef38 100644
--- a/style/beamer.el
+++ b/style/beamer.el
@@ -137,7 +137,7 @@
'("exampleblock" 1)
'("frame" (lambda (env &rest ignore)
(let ((title (TeX-read-string "(Optional) Title: " nil
- 'LaTeX-beamer-frametitle-history)))
+
'LaTeX-beamer-frametitle-history)))
(LaTeX-insert-environment env)
(unless (zerop (length title))
(save-excursion
@@ -172,8 +172,6 @@
(make-local-variable 'LaTeX-indent-environment-list)
(add-to-list 'LaTeX-indent-environment-list
'("semiverbatim" current-indentation))
- (make-local-variable 'LaTeX-verbatim-regexp)
- (setq LaTeX-verbatim-regexp (concat LaTeX-verbatim-regexp
"\\|semiverbatim"))
(add-to-list 'LaTeX-verbatim-environments-local "semiverbatim")
;; Fontification
diff --git a/style/fancyvrb.el b/style/fancyvrb.el
index 92718b4..8334708 100644
--- a/style/fancyvrb.el
+++ b/style/fancyvrb.el
@@ -159,10 +159,6 @@
"FancyVerbLine")
;; Filling
- (set (make-local-variable 'LaTeX-verbatim-regexp)
- (concat
- LaTeX-verbatim-regexp
- "\\|Verbatim\\|BVerbatim\\|LVerbatim\\|SaveVerbatim\\|VerbatimOut"))
(add-to-list 'LaTeX-verbatim-environments-local "Verbatim")
(add-to-list 'LaTeX-verbatim-environments-local "BVerbatim")
(add-to-list 'LaTeX-verbatim-environments-local "LVerbatim")
@@ -190,7 +186,7 @@
("LVerbatimInput" "[{"))
'reference)
(font-latex-add-keywords '(("Verb" "[")) ; The second argument should
- ; actually be verbatim.
+ ; actually be verbatim.
'textual)
(font-latex-add-keywords '(("fvset" "{")) 'variable)
;; For syntactic fontification, e.g. verbatim constructs.
diff --git a/style/listings.el b/style/listings.el
index 534de62..ace5c97 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -248,8 +248,6 @@
(make-local-variable 'LaTeX-indent-environment-list)
(add-to-list 'LaTeX-indent-environment-list
'("lstlisting" current-indentation))
- (make-local-variable 'LaTeX-verbatim-regexp)
- (setq LaTeX-verbatim-regexp (concat LaTeX-verbatim-regexp "\\|lstlisting"))
(add-to-list 'LaTeX-verbatim-environments-local "lstlisting")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline")
@@ -260,7 +258,7 @@
(font-latex-add-keywords '(("lstnewenvironment" "{[[{{")) 'function)
(font-latex-add-keywords '(("lstinputlisting" "[{")) 'reference)
(font-latex-add-keywords '(("lstinline" "[{") ; The second argument should
- ; actually be verbatim.
+ ; actually be verbatim.
("lstlistoflistings" ""))
'textual)
(font-latex-add-keywords '(("lstalias" "{{")
- [elpa] elpa 18ee3e9 17/26: Add `Form' environment needed for PDF and HTML forms., (continued)
- [elpa] elpa 18ee3e9 17/26: Add `Form' environment needed for PDF and HTML forms., Tassilo Horn, 2015/01/27
- [elpa] elpa b54c26a 16/26: Fix doc build, Tassilo Horn, 2015/01/27
- [elpa] elpa 2487022 15/26: Update changes.texi, Tassilo Horn, 2015/01/27
- [elpa] elpa df97f94 13/26: Improve minted style., Tassilo Horn, 2015/01/27
- [elpa] elpa fff9412 14/26: Add hva file assoc to auto-mode-alist (bug#19426), Tassilo Horn, 2015/01/27
- [elpa] elpa 49ee91a 03/26: Fix byte-compile warnings., Tassilo Horn, 2015/01/27
- [elpa] elpa d3d05d4 12/26: Make some buffer-local vars document-local., Tassilo Horn, 2015/01/27
- [elpa] elpa ddd6b97 11/26: Improve minted style., Tassilo Horn, 2015/01/27
- [elpa] elpa 6e94ea0 09/26: Add (start of an) minted style., Tassilo Horn, 2015/01/27
- [elpa] elpa ff1f544 10/26: Fix encoding file:// uri., Tassilo Horn, 2015/01/27
- [elpa] elpa 63bcbcd 08/26: Obsolete LaTeX-verbatim-regexp defcustom,
Tassilo Horn <=
- [elpa] elpa 0cc29f9 07/26: Fix void-variable error., Tassilo Horn, 2015/01/27
- [elpa] elpa fc9a240 06/26: Fix bug#19398 in TeX-evince-sync-view, Tassilo Horn, 2015/01/27
- [elpa] elpa c7e1e47 05/26: [Fix #19281] Allow moodifying environments with macros in their names., Tassilo Horn, 2015/01/27
- [elpa] elpa 8dd1455 04/26: Fix in style/babel.el., Tassilo Horn, 2015/01/27
- [elpa] elpa 8c6a5ae 02/26: [Fix #19301] Fix closing bracket in style/mathtools.el., Tassilo Horn, 2015/01/27
- [elpa] elpa 6bfd4c8 01/26: Add new styles., Tassilo Horn, 2015/01/27