[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 51d8d3d 75/95: Recognize optional argument in ve
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 51d8d3d 75/95: Recognize optional argument in verb macros with delimiters/braces |
Date: |
Sun, 16 Apr 2017 01:27:00 -0400 (EDT) |
branch: externals/auctex
commit 51d8d3da4ab450beb2812892f38159be38c013c1
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Recognize optional argument in verb macros with delimiters/braces
* font-latex.el (font-latex-built-in-keyword-classes): Add \verb
to textual keyword class.
(font-latex-set-syntactic-keywords): Extend regexp to ignore an
optional argument for verbatim macros with delimiters and/or
braces.
---
font-latex.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/font-latex.el b/font-latex.el
index a56d3ce..0f2c893 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -387,7 +387,7 @@ variable `font-latex-fontify-sectioning'." ',num)
("textual"
(("item" "[") ("title" "{") ("author" "{") ("date" "{")
("thanks" "{") ("address" "{") ("caption" "[{")
- ("textsuperscript" "{") ("textsubscript" "{"))
+ ("textsuperscript" "{") ("textsubscript" "{") ("verb" "*"))
font-lock-type-face 2 command)
("bold-command"
(("textbf" "{") ("textsc" "{") ("textup" "{") ("boldsymbol" "{")
@@ -1005,6 +1005,10 @@ have changed."
(unless (= (length verb-macros-with-delims) 0)
(add-to-list 'font-latex-syntactic-keywords
`(,(concat "\\\\\\(?:" verb-macros-with-delims "\\)"
+ ;; Some macros take an optional
+ ;; argument. This is the same line as
+ ;; above for environments.
+ "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
;; An opening curly brace as delimiter
;; is valid, but allowing it might screw
;; up fontification of stuff like
@@ -1019,6 +1023,10 @@ have changed."
(unless (= (length verb-macros-with-braces) 0)
(add-to-list 'font-latex-syntactic-keywords
`(,(concat "\\\\\\(?:" verb-macros-with-braces "\\)"
+ ;; Some macros take an optional
+ ;; argument. This is the same line as
+ ;; above for environments.
+ "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
"\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)")
(1 "|") (2 "|")))))
(when font-latex-syntactic-keywords-extra
- [elpa] externals/auctex 83a875b 83/95: ; * tex.el (TeX-ispell-tex-arg-verb-end): Drop unnecessary `format'., (continued)
- [elpa] externals/auctex 83a875b 83/95: ; * tex.el (TeX-ispell-tex-arg-verb-end): Drop unnecessary `format'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 2116248 94/95: * doc/changes.texi: Update with recent changes., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 65e56e1 93/95: ; Make sure that `regex-opt' builds a shy group., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex e6c95e9 78/95: * tests/latex/fontification-verb-macros.tex: New file., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a8dba19 60/95: Fix addition of key=val's, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4688310 65/95: Add new compat function `TeX-replace-regexp-in-string', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6b5a7e0 56/95: Improve fallback for indentation when & is omitted, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 592297d 64/95: Avoid altering user option as much as possible, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 7a382d2 72/95: * texmathp.el (texmathp-tex-commands-default): Add entries for empheq.sty., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 2fef12e 80/95: ; Clear out byte compile warning, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 51d8d3d 75/95: Recognize optional argument in verb macros with delimiters/braces,
Tassilo Horn <=
- [elpa] externals/auctex d5951e6 79/95: Improve skipping of inline verbatim macros, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a45821b 92/95: ; * latex.el (LaTeX-section-list-add-locally): Fix doc string., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex d82f66c 91/95: ; * style/paracol.el (TeX-arg-paracol-switchcolumn*): Guard point movement., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex b2f69e1 84/95: Fix detection of bibliography files with dots in path, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex ee42d37 73/95: Enhance Japanese class files support, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 334da3d 95/95: Merge branch 'master' into externals/auctex, Tassilo Horn, 2017/04/16