[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 79361b5 58/95: Add new style/fvextra.el
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 79361b5 58/95: Add new style/fvextra.el |
Date: |
Sun, 16 Apr 2017 01:26:55 -0400 (EDT) |
branch: externals/auctex
commit 79361b58dc0e22cbf4bed1847c8f8a53c4a8cb17
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Add new style/fvextra.el
* Makefile.in (STYLESRC): Add new style.
* style/fvextra.el: New file.
---
Makefile.in | 2 +-
style/fvextra.el | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 141 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 7264f49..19c8e83 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -164,7 +164,7 @@ STYLESRC = style/prosper.el \
style/dcolumn.el style/mdframed.el style/tcolorboxlib-raster.el \
style/titleps.el style/titlesec.el style/titletoc.el \
style/exam.el style/breqn.el style/sourcecodepro.el \
- style/preview.el
+ style/preview.el style/fvextra.el
STYLEELC = $(STYLESRC:.el=.elc)
diff --git a/style/fvextra.el b/style/fvextra.el
new file mode 100644
index 0000000..18315d4
--- /dev/null
+++ b/style/fvextra.el
@@ -0,0 +1,140 @@
+;;; fvextra.el --- AUCTeX style for `fvextra.sty' (v1.2.1)
+
+;; Copyright (C) 2017 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2017-03-05
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `fvextra.sty' (v1.2.1) from 2016/09/02.
+;; `fvextra.sty' is part of TeXLive.
+
+;;; Code:
+
+;; Needed for compiling `pushnew':
+(eval-when-compile (require 'cl))
+
+(defvar LaTeX-fvextra-key-val-options
+ '(;; 3 General options
+ ("curlyquotes" ("true" "false"))
+ ("highlightcolor")
+ ("highlightlines")
+ ("linenos" ("true" "false"))
+ ("mathescape" ("true" "false"))
+ ("numberfirstline" ("true" "false"))
+ ;; ("numbers" ("none" "left" "right" "both"))
+ ("space" ("\\textvisiblespace"))
+ ("spacecolor" ("none"))
+ ("stepnumberfromfirst" ("true" "false"))
+ ("stepnumberoffsetvalues" ("true" "false"))
+ ("tab" ("\\FancyVerbTab"))
+ ("tabcolor" ("none"))
+ ;; 5.1 Line breaking options
+ ("breakafter" ("none"))
+ ("breakaftergroup" ("true" "false"))
+ ("breakaftersymbolpre")
+ ("breakaftersymbolpost")
+ ("breakanywhere" ("true" "false"))
+ ("breakanywheresymbolpre")
+ ("breakanywheresymbolpost")
+ ("breakautoindent" ("true" "false"))
+ ("breakbefore")
+ ("breakbeforegroup" ("true" "false"))
+ ("breakbeforesymbolpre")
+ ("breakbeforesymbolpost")
+ ("breakindent")
+ ("breaklines" ("true" "false"))
+ ("breaksymbol")
+ ("breaksymbolleft")
+ ("breaksymbolright")
+ ("breaksymbolindent")
+ ("breaksymbolindentleft")
+ ("breaksymbolindentright")
+ ("breaksymbolsep")
+ ("breaksymbolsepleft")
+ ("breaksymbolsepright"))
+ "Key=value options for fvextra macros and environments.")
+
+(defun LaTeX-fvextra-update-key-val ()
+ "Update `LaTeX-fancyvrb-key-val-options-local' with key=vals from
\"fvextra.sty\"."
+ ;; Delete the key "numbers" from `LaTeX-fancyvrb-key-val-options-local':
+ (setq LaTeX-fancyvrb-key-val-options-local
+ (assq-delete-all (car (assoc "numbers"
LaTeX-fancyvrb-key-val-options-local))
+ LaTeX-fancyvrb-key-val-options-local))
+ ;; Add the key with "both" value:
+ (setq LaTeX-fancyvrb-key-val-options-local
+ (add-to-list 'LaTeX-fancyvrb-key-val-options-local
+ '("numbers" ("none" "left" "right" "both"))))
+
+ (when (or (member "xcolor" (TeX-style-list))
+ (member "color" (TeX-style-list)))
+ (let* ((colorcmd (if (member "xcolor" (TeX-style-list))
+ #'LaTeX-xcolor-definecolor-list
+ #'LaTeX-color-definecolor-list))
+ (keys '("highlightcolor"
+ "rulecolor"
+ "fillcolor"
+ "tabcolor"
+ "spacecolor"))
+ (tmp (copy-alist LaTeX-fancyvrb-key-val-options-local)))
+ (dolist (x keys)
+ (assq-delete-all (car (assoc x tmp)) tmp)
+ (if (string= x "highlightcolor")
+ (pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test
#'equal)
+ (pushnew (list x (append '("none") (mapcar #'car (funcall
colorcmd)))) tmp :test #'equal)))
+ (setq LaTeX-fancyvrb-key-val-options-local
+ (copy-alist tmp)))))
+
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-fvextra-update-key-val t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+
+(TeX-add-style-hook
+ "fvextra"
+ (lambda ()
+
+ ;; Run the style hook for "fancyvrb"
+ (TeX-run-style-hooks "fancyvrb")
+
+ ;; Append `LaTeX-fvextra-key-val' to `LaTeX-fancyvrb-key-val-options-local':
+ (setq LaTeX-fancyvrb-key-val-options-local
+ (append LaTeX-fvextra-key-val-options
+ LaTeX-fancyvrb-key-val-options-local))
+
+ (TeX-add-symbols
+ ;; 4.1 Line and text formatting
+ "FancyVerbFormatText"
+
+ ;; 5.3.2 Breaks within macro arguments
+ "FancyVerbBreakStart"
+ "FancyVerbBreakStop"
+
+ ;; 5.3.3 Customizing break behavior
+ "FancyVerbBreakAnywhereBreak"
+ "FancyVerbBreakBeforeBreak"
+ "FancyVerbBreakAfterBreak"))
+ LaTeX-dialect)
+
+(defvar LaTeX-fvextra-package-options nil
+ "Package options for the fvextra package.")
+
+;;; fvextra.el ends here
- [elpa] externals/auctex 72a6943 54/95: Add fallback for indentation when & is omitted, (continued)
- [elpa] externals/auctex 72a6943 54/95: Add fallback for indentation when & is omitted, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 8fdc494 63/95: ; Provide fallback when no locale information is available, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 9d12a06 66/95: Use `TeX-replace-regexp-in-string' in style files, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a71a72d 74/95: Add support for Japanese font command, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 88a7563 81/95: Fix last improvement for skipping of inline verbatim macros, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 16f24dd 90/95: ; * style/minted.el (LaTeX-minted-add-syntactic-keywords-extra): Fix doc string., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a46c307 77/95: Improve fontification of verbatim macros in style/minted.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 83890d6 86/95: Update package options in style/amsmath.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 94b227d 89/95: * doc/auctex.texi (Selecting a Command): Document `TeX-ispell-verb-delimiters'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4225941 59/95: Modify `TeX-expand-list-builtin' instead of `TeX-expand-list', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 79361b5 58/95: Add new style/fvextra.el,
Tassilo Horn <=
- [elpa] externals/auctex d0908cb 51/95: Fix auto selection of japanese TeX engine, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex aac8694 67/95: Use compat function `TeX-replace-regexp-in-string' in core files, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 5a84d95 88/95: Fix `paragraph-start' and `paragraph-separate', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 618bdf1 85/95: Append \b to regexp built from TeX control words, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 0cde29b 87/95: ; * tex-ispell.el (TeX-ispell-verb-delimiters): Remove `*'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 07a2903 82/95: Don't alter standard value or saved value themselves of customize option, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 194a8f8 62/95: Add LaTeX inline math delimiters to Ispell skip list, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 7390999 61/95: ; Simplify insertion of a newline after label, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6a298a8 47/95: Fix documents and add trivial improvements., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a286e8b 57/95: Improve parsing capabilities of style/fancyvrb.el, Tassilo Horn, 2017/04/16