[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 7e3bec8 44/51: Run `TeX-add-symbols' if "xcolor" is not an a
From: |
Tassilo Horn |
Subject: |
[elpa] elpa 7e3bec8 44/51: Run `TeX-add-symbols' if "xcolor" is not an active style |
Date: |
Sun, 22 May 2016 07:22:50 +0000 (UTC) |
branch: elpa
commit 7e3bec88c69b684bb98c0d6b5b0031ad8aa80eca
Author: Arash Esbati <address@hidden>
Commit: Mosè Giordano <address@hidden>
Run `TeX-add-symbols' if "xcolor" is not an active style
* style/color.el ("color"): Check if "xcolor" is an active style
and then run `TeX-add-symbols' on commands defined by "color.sty"
and add fontification support.
Signed-off-by: Mosè Giordano <address@hidden>
---
style/color.el | 79 ++++++++++++++++++++++++++++----------------------------
1 file changed, 40 insertions(+), 39 deletions(-)
diff --git a/style/color.el b/style/color.el
index 9d008b7..a7cce3f 100644
--- a/style/color.el
+++ b/style/color.el
@@ -1,6 +1,6 @@
;;; color.el --- AUCTeX style for `color.sty' (v1.1a)
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: address@hidden
@@ -259,44 +259,45 @@ package.")
(LaTeX-provided-package-options-member "color" "dvipsnames")))
(apply #'LaTeX-add-color-definecolors LaTeX-color-dvipsnames-colors))
- (TeX-add-symbols
- ;; \definecolor{<name>}{<model>}{<color spec>}
- '("definecolor" TeX-arg-color-definecolor)
-
- ;; \color{<name>} or \color[<model>]{<color spec>}
- '("color" TeX-arg-color)
-
- ;; \textcolor{<name>}{<text>} or
- ;; \textcolor[<model>]{<color spec>}{<text>}
- '("textcolor" TeX-arg-color "Text")
-
- ;; \pagecolor{<name>} or
- ;; \pagecolor[<model>]{<color spec>}
- '("pagecolor" TeX-arg-color)
-
- ;; \nopagecolor
- '("nopagecolor" 0)
-
- ;; \colorbox{<name>}{<text>} or
- ;; \colorbox[<model>]{<color spec>}{<text>}
- '("colorbox" TeX-arg-color "Text")
-
- ;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or
- ;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>}
- '("fcolorbox" TeX-arg-color-fcolorbox "Text"))
-
- ;; Fontification
- (when (and (featurep 'font-latex)
- (eq TeX-install-font-lock 'font-latex-setup))
- (font-latex-add-keywords '(("color" "[{")
- ("pagecolor" "[{"))
- 'type-declaration)
- (font-latex-add-keywords '(("textcolor" "[{{")
- ("colorbox" "[{{" )
- ("fcolorbox" "[{{{"))
- 'type-command)
- (font-latex-add-keywords '(("definecolor" "{{{"))
- 'function)))
+ (unless (member "xcolor" (TeX-style-list))
+ (TeX-add-symbols
+ ;; \definecolor{<name>}{<model>}{<color spec>}
+ '("definecolor" TeX-arg-color-definecolor)
+
+ ;; \color{<name>} or \color[<model>]{<color spec>}
+ '("color" TeX-arg-color)
+
+ ;; \textcolor{<name>}{<text>} or
+ ;; \textcolor[<model>]{<color spec>}{<text>}
+ '("textcolor" TeX-arg-color "Text")
+
+ ;; \pagecolor{<name>} or
+ ;; \pagecolor[<model>]{<color spec>}
+ '("pagecolor" TeX-arg-color)
+
+ ;; \nopagecolor
+ '("nopagecolor" 0)
+
+ ;; \colorbox{<name>}{<text>} or
+ ;; \colorbox[<model>]{<color spec>}{<text>}
+ '("colorbox" TeX-arg-color "Text")
+
+ ;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or
+ ;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>}
+ '("fcolorbox" TeX-arg-color-fcolorbox "Text"))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("color" "[{")
+ ("pagecolor" "[{"))
+ 'type-declaration)
+ (font-latex-add-keywords '(("textcolor" "[{{")
+ ("colorbox" "[{{" )
+ ("fcolorbox" "[{{{"))
+ 'type-command)
+ (font-latex-add-keywords '(("definecolor" "{{{"))
+ 'function))))
LaTeX-dialect)
(defvar LaTeX-color-package-options
- [elpa] elpa 63a83c3 30/51: Make unloading of tex-site work on Emacs 24, (continued)
- [elpa] elpa 63a83c3 30/51: Make unloading of tex-site work on Emacs 24, Tassilo Horn, 2016/05/22
- [elpa] elpa 5886c49 41/51: Improve the insertation of "macro" environment, Tassilo Horn, 2016/05/22
- [elpa] elpa e19f8bd 37/51: Do not check TeX engine with ifluatex package, Tassilo Horn, 2016/05/22
- [elpa] elpa 79a8643 47/51: Respect both "xcolor" and "color" for command queries, Tassilo Horn, 2016/05/22
- [elpa] elpa ccfe316 42/51: Make TeX-view work better with regions, Tassilo Horn, 2016/05/22
- [elpa] elpa d418e9a 15/51: Prevent infinite loop in TeX-command-expand, Tassilo Horn, 2016/05/22
- [elpa] elpa 4f9666b 24/51: Use customize option `TeX-region' instead of "_region_", Tassilo Horn, 2016/05/22
- [elpa] elpa a83c4d0 02/51: Fix compatibility with older Emacs versions, Tassilo Horn, 2016/05/22
- [elpa] elpa 13153ba 40/51: Use commit date for package date also in configure, Tassilo Horn, 2016/05/22
- [elpa] elpa 7fc63f1 39/51: Tweak mode name only when file local variable is enabled., Tassilo Horn, 2016/05/22
- [elpa] elpa 7e3bec8 44/51: Run `TeX-add-symbols' if "xcolor" is not an active style,
Tassilo Horn <=
- [elpa] elpa f0849b4 10/51: TikZ: Add the 'sin' and 'cos' connectors., Tassilo Horn, 2016/05/22
- [elpa] elpa 7ea1aa3 18/51: TikZ: Don't allow relative points with \coordinate., Tassilo Horn, 2016/05/22
- [elpa] elpa c032063 19/51: Auto save `TeX-command-extra-options'., Tassilo Horn, 2016/05/22
- [elpa] elpa 56c1afd 28/51: Call TeX-newline-function interactively, Tassilo Horn, 2016/05/22
- [elpa] elpa eb9986d 46/51: Respect both "xcolor" and "color" for query to "shadecolor", Tassilo Horn, 2016/05/22
- [elpa] elpa 40c2c26 32/51: Allow for negative offsets in region backward search, Tassilo Horn, 2016/05/22
- [elpa] elpa 9613bdd 36/51: Check TeX engine only once, Tassilo Horn, 2016/05/22
- [elpa] elpa d9910d4 21/51: Fix small errors in doc string and comment, Tassilo Horn, 2016/05/22
- [elpa] elpa 6eb95e6 14/51: Integrate viewer support between tex.el and tex-jp.el, Tassilo Horn, 2016/05/22
- [elpa] elpa e90e050 34/51: Insert braces after some macros and \relax after \ProcessOptions, Tassilo Horn, 2016/05/22