auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex f9c7245 22/25: Improve style/foot


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex f9c7245 22/25: Improve style/footmisc.el
Date: Sun, 21 Mar 2021 11:44:43 -0400 (EDT)

branch: externals/auctex
commit f9c724510b64a3f9dcd23c9b989a24c2bc64a436
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Improve style/footmisc.el
    
    * style/footmisc.el ("footmisc"): Add completion support for some
    macros.  Support special macros defined only with `splitrule'
    option.  Improve fontification.
---
 style/footmisc.el | 90 +++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 68 insertions(+), 22 deletions(-)

diff --git a/style/footmisc.el b/style/footmisc.el
index dc3a807..7069e89 100644
--- a/style/footmisc.el
+++ b/style/footmisc.el
@@ -1,6 +1,6 @@
 ;;; footmisc.el --- AUCTeX style for `footmisc.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2011, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2018--2021 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Created: 2011-04-08
@@ -25,7 +25,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `footmisc.sty'.
+;; This file adds support for `footmisc.sty' (v5.5b) from 2011/06/06.
 
 ;;; Code:
 
@@ -40,34 +40,80 @@
  "footmisc"
  (lambda ()
    (TeX-add-symbols
-    '("DefineFNsymbols" "Name" [ "Style (text or math) " ] 1) 
-    '("DefineFNsymbols*" "Name" [ "Style  (text or math)" ] 1)
+
+    ;; 1.4 Option ragged and \footnotelayout
+    "footnotelayout"
+
+    ;; 1.7 The \setfnsymbol and \DefineFNsymbols commands
+    '("DefineFNsymbols"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt nil nil "Name")
+                    '("bringhurst" "chicago" "wiley"
+                      "lamport" "lamport*"))
+      [TeX-arg-eval completing-read
+                    (TeX-argument-prompt t nil "Style (text or math)")
+                    '("text" "math")]
+      1)
+    '("DefineFNsymbols*"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt nil nil "Name")
+                    '("bringhurst" "chicago" "wiley"
+                      "lamport" "lamport*"))
+      [TeX-arg-eval completing-read
+                    (TeX-argument-prompt t nil "Style (text or math)")
+                    '("text" "math")]
+      1)
+
     ;; These two commands define both text and math variants of the
     ;; footnote symbols
-    '("DefineFNsymbolsTM" "Name" 1)
-    '("DefineFNsymbolsTM*" "Name" 1)
-    '("setfnsymbol" "Name")
-    '("mpfootnoterule" TeX-arg-size) 
-    "pagefootnoterule"
-    "splitfootnoterule"
-    ;; The following command references a label inside in a footnote
-    '("footref" TeX-arg-ref)
+    '("DefineFNsymbolsTM"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt nil nil "Name")
+                    '("bringhurst" "chicago" "wiley"
+                      "lamport" "lamport*"))
+      1)
+    '("DefineFNsymbolsTM*"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt nil nil "Name")
+                    '("bringhurst" "chicago" "wiley"
+                      "lamport" "lamport*"))
+      1)
+    '("setfnsymbol"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt nil nil "Name")
+                    '("bringhurst" "chicago" "wiley"
+                      "lamport" "lamport*")))
+
+    ;; 1.11 Option hang
     "hangfootparskip"
     "hangfootparindent"
-    "footnotehint"
-    '("footnotemargin" TeX-arg-size)
-    "mpfootnoterule"
+
+    ;; 1.15 The multiple option
     "multiplefootnotemarker"
-    "multfootsep")
+    "multfootsep"
+
+    ;; 1.16 User interface
+    ;; The following command references a label inside in a footnote
+    '("footref" TeX-arg-ref)
+    "mpfootnotemark")
+
+   ;; 1.9 Option marginal
+   (LaTeX-add-lengths "footnotemargin")
+
+   ;; 1.13 Option splitrule
+   (when (LaTeX-provided-package-options-member "footmisc" "splitrule")
+     (TeX-add-symbols "mpfootnoterule"
+                      "pagefootnoterule"
+                      "splitfootnoterule"))
 
    (when (and (featurep 'font-latex)
               (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("DefineFNsymbols" "{[{")
-                                ("DefineFNsymbols*" "{[{")
-                                ("DefineFNsymbolsTM" "{{")
-                                ("DefineFNsymbolsTM*" "{{")
-                                ("setfnsymbol" "{")) 'function)
-     (font-latex-add-keywords '(("footnoteref")) 'reference)))
+     (font-latex-add-keywords '(("DefineFNsymbols"   "*{[{")
+                                ("DefineFNsymbolsTM" "*{{")
+                                ("setfnsymbol"       "{"))
+                              'function)
+     (font-latex-add-keywords '(("footref"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-footmisc-package-options '("perpage" "side" "ragged"




reply via email to

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