auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] [elpa] externals/auctex 3e179f8 53/80: Update style/fvext


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 3e179f8 53/80: Update style/fvextra.el to package version 1.4
Date: Wed, 16 Oct 2019 11:07:16 -0400 (EDT)

branch: externals/auctex
commit 3e179f890c52657ea27ed4b0319cfc65fbd80cd0
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Update style/fvextra.el to package version 1.4
    
    * style/fvextra.el (LaTeX-fvextra-key-val-options): Add new keys.
    ("fvextra"): Add new macros.  Add fontification support for
    \EscVerb macro.
---
 style/fvextra.el | 74 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 65 insertions(+), 9 deletions(-)

diff --git a/style/fvextra.el b/style/fvextra.el
index e5f5d19..4e817ee 100644
--- a/style/fvextra.el
+++ b/style/fvextra.el
@@ -1,6 +1,6 @@
-;;; fvextra.el --- AUCTeX style for `fvextra.sty' (v1.2.1)
+;;; fvextra.el --- AUCTeX style for `fvextra.sty' (v1.4)
 
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017, 2019 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
@@ -26,7 +26,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `fvextra.sty' (v1.2.1) from 2016/09/02.
+;; This file adds support for `fvextra.sty' (v1.4) from 2019/02/04.
 ;; `fvextra.sty' is part of TeXLive.
 
 ;;; Code:
@@ -35,27 +35,50 @@
 (eval-when-compile
   (require 'cl-lib))
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                 "font-latex"
+                 (keywords class))
+
+(declare-function font-latex-update-font-lock
+                 "font-latex"
+                 (&optional syntactic-kws))
+
 (declare-function LaTeX-color-definecolor-list "color" ())
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
 
+;; Defined in fancyvrb.el:
 (defvar LaTeX-fancyvrb-key-val-options-local)
 
 (defvar LaTeX-fvextra-key-val-options
   '(;; 3 General options
+    ("beameroverlays" ("true" "false"))
     ("curlyquotes" ("true" "false"))
+    ("extra" ("true" "false"))
+    ("fontencoding" (;; Reset to default document font encoding
+                    "none"
+                    ;; 128+ glyph encodings (text)
+                    "OT1" "OT2" "OT3" "OT4" "OT6"
+                    ;; 256 glyph encodings (text)
+                    "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5"
+                    ;; 256 glyph encodings (text extended)
+                    "X2"
+                    ;; Other encodings
+                    "LY1" "LV1" "LGR"))
     ("highlightcolor")
     ("highlightlines")
     ("linenos" ("true" "false"))
     ("mathescape" ("true" "false"))
     ("numberfirstline" ("true" "false"))
     ;; ("numbers" ("none" "left" "right" "both"))
+    ("retokenize" ("true" "false"))
     ("space" ("\textvisiblespace"))
     ("spacecolor" ("none"))
     ("stepnumberfromfirst" ("true" "false"))
     ("stepnumberoffsetvalues" ("true" "false"))
     ("tab" ("\FancyVerbTab"))
     ("tabcolor" ("none"))
-    ;; 5.1 Line breaking options
+    ;; 7.1 Line breaking options
     ("breakafter" ("none"))
     ("breakaftergroup" ("true" "false"))
     ("breakaftersymbolpre")
@@ -69,16 +92,23 @@
     ("breakbeforesymbolpre")
     ("breakbeforesymbolpost")
     ("breakindent")
+    ("breakindentnchars")
     ("breaklines" ("true" "false"))
     ("breaksymbol")
     ("breaksymbolleft")
     ("breaksymbolright")
     ("breaksymbolindent")
+    ("breaksymbolindentnchars")
     ("breaksymbolindentleft")
+    ("breaksymbolindentleftnchars")
     ("breaksymbolindentright")
+    ("breaksymbolindentrightnchars")
     ("breaksymbolsep")
+    ("breaksymbolsepnchars")
     ("breaksymbolsepleft")
-    ("breaksymbolsepright"))
+    ("breaksymbolsepleftnchars")
+    ("breaksymbolsepright")
+    ("breaksymbolseprightnchars"))
   "Key=value options for fvextra macros and environments.")
 
 (defun LaTeX-fvextra-update-key-val ()
@@ -126,17 +156,43 @@
                 LaTeX-fancyvrb-key-val-options-local))
 
    (TeX-add-symbols
-    ;; 4.1 Line and text formatting
+    ;; 4.1 Inline formatting with vinlineset
+    '("fvinlineset" (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
+
+    ;; 4.2 Line and text formatting
     "FancyVerbFormatText"
 
-    ;; 5.3.2 Breaks within macro arguments
+    ;; 6 New commands and environments
+    ;; 6.1 \EscVerb
+    '("EscVerb"
+      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] "Text")
+    '("EscVerb*"
+      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] "Text")
+
+    ;; 7.3.2 Breaks within macro arguments
     "FancyVerbBreakStart"
     "FancyVerbBreakStop"
 
-    ;; 5.3.3 Customizing break behavior
+    ;; 7.3.3 Customizing break behavior
     "FancyVerbBreakAnywhereBreak"
     "FancyVerbBreakBeforeBreak"
-    "FancyVerbBreakAfterBreak"))
+    "FancyVerbBreakAfterBreak")
+
+   ;; Add \EscVerb*? to `LaTeX-verbatim-macros-with-braces-local':
+   (add-to-list 'LaTeX-verbatim-macros-with-braces-local
+               "EscVerb" t)
+   (add-to-list 'LaTeX-verbatim-macros-with-braces-local
+               "EscVerb*" t)
+
+   ;; Fontification
+   (when (and (fboundp 'font-latex-add-keywords)
+             (fboundp 'font-latex-update-font-lock)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("fvinlineset" "{"))
+                             'function)
+     (font-latex-add-keywords '(("EscVerb"     "*["))
+                             'textual)
+     (font-latex-update-font-lock t)) )
  LaTeX-dialect)
 
 (defvar LaTeX-fvextra-package-options nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]