auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 2c5c2e19e733b902e450f


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 2c5c2e19e733b902e450f05070f9d3f3953e130a
Date: Tue, 12 Jan 2021 16:42:08 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  2c5c2e19e733b902e450f05070f9d3f3953e130a (commit)
       via  130010b12f0090efe7e172c56fb53f42dea05c02 (commit)
       via  3baaff2db3a6d7089d7e8780125338d920fb2c2b (commit)
      from  3f38eb2d38c5097d34cc4b7c1dc1502e350ee644 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2c5c2e19e733b902e450f05070f9d3f3953e130a
Author: Arash Esbati <arash@gnu.org>
Date:   Tue Jan 12 22:39:28 2021 +0100

    Add support for some missing kernel macros
    
    * font-latex.el (font-latex-built-in-keyword-classes): Add various
    \<sectioning>mark to "reference" class.
    
    * latex.el (LaTeX-common-initialization): Add support for \...mark
    macros.

diff --git a/font-latex.el b/font-latex.el
index bf258f1..494fb30 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -338,7 +338,9 @@ variable `font-latex-fontify-sectioning'." ',num)
       ("vref" "*{") ("eqref" "{") ("ref" "{") ("Ref" "{") ("include" "{")
       ("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{")
       ("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{")
-      ("marginpar" "[{"))
+      ("marginpar" "[{") ("chaptermark" "{") ("sectionmark" "{")
+      ("subsectionmark" "{") ("subsubsectionmark" "{")
+      ("paragraphmark" "{") ("subparagraphmark" "{"))
      font-lock-constant-face 2 command)
     ("function"
      (("begin" "{") ("end" "{") ("pagenumbering" "{")
diff --git a/latex.el b/latex.el
index 3639bf6..c25cc24 100644
--- a/latex.el
+++ b/latex.el
@@ -6540,9 +6540,18 @@ function would return non-nil and `(match-string 1)' 
would return
      '("textsubscript" "Text")
      '("textcircled" "Text")
      '("mathring" t)
+     '("MakeUppercase" t)
+     '("MakeLowercase" t)
+     '("chaptermark" "Text")
+     '("sectionmark" "Text")
+     '("subsectionmark" "Text")
+     '("subsubsectionmark" "Text")
+     '("paragraphmark" "Text")
+     '("subparagraphmark" "Text")
 
      "LaTeXe"
      "listfiles" "frontmatter" "mainmatter" "backmatter"
+     "leftmark" "rightmark"
      "textcompwordmark" "textvisiblespace" "textemdash" "textendash"
      "textexclamdown" "textquestiondown" "textquotedblleft"
      "textquotedblright" "textquoteleft" "textquoteright"

commit 130010b12f0090efe7e172c56fb53f42dea05c02
Author: Arash Esbati <arash@gnu.org>
Date:   Tue Jan 12 22:34:20 2021 +0100

    Add new style/extramarks.el
    
    * Makefile.in (STYLESRC): Add new style.
    
    * style/extramarks.el: New file.

diff --git a/Makefile.in b/Makefile.in
index e83c74c..9afc328 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
 
 # Maintainer: auctex-devel@gnu.org
 
-# Copyright (C) 2003-2008, 2010, 2013-2015, 2018-2019 Free Software
+# Copyright (C) 2003-2008, 2010, 2013-2015, 2018-2021 Free Software
 #   Foundation, Inc.
 
 # This file is part of AUCTeX.
@@ -173,7 +173,7 @@ STYLESRC = style/prosper.el \
           style/multitoc.el  style/fbox.el      style/xkcdcolors.el \
           style/ltxguide.el  style/revtex4-2.el style/overpic.el \
           style/tex-live.el  style/algorithm.el style/algpseudocode.el \
-          style/appendix.el  style/scholax.el
+          style/appendix.el  style/scholax.el   style/extramarks.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/extramarks.el b/style/extramarks.el
new file mode 100644
index 0000000..b227307
--- /dev/null
+++ b/style/extramarks.el
@@ -0,0 +1,72 @@
+;;; extramarks.el --- AUCTeX style for `extramarks.sty' (v4.0)  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2021-01-12
+;; 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 `extramarks.sty' (v4.0) from 2021/01/04.
+;; `extramarks.sty' is part of TeXLive.
+
+;;; Code:
+
+(require 'tex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
+
+(TeX-add-style-hook
+ "extramarks"
+ (lambda ()
+
+   ;; New symbols
+   (TeX-add-symbols
+    "firstleftmark"
+    "lastrightmark"
+    "firstrightmark"
+    "lastleftmark"
+    "firstleftxmark"
+    "firstrightxmark"
+    "topleftxmark"
+    "toprightxmark"
+    "lastleftxmark"
+    "lastrightxmark"
+    "firstxmark"
+    "lastxmark"
+    "topxmark"
+    '("extramarks" 2))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("extramarks" "{{"))
+                              'function)))
+ TeX-dialect)
+
+(defvar LaTeX-extramarks-package-options nil
+  "Package options for the extramarks package.")
+
+;;; extramarks.el ends here

commit 3baaff2db3a6d7089d7e8780125338d920fb2c2b
Author: Arash Esbati <arash@gnu.org>
Date:   Tue Jan 12 22:31:11 2021 +0100

    Update style/fancyhdr.el to package version 4.0
    
    * style/fancyhdr.el (TeX-arg-fancyhdr-place): Rename from
    `TeX-arg-fancyhdr-position'.  Improve list of candidates for
    completion.
    (LaTeX-fancyhdr-fancypagestyle-regexp): New variable for parsing
    user defined pagestyles.
    ("fancyhdr"): Update for macros provided by package version 4.0.
    Remove completion support for deprecated macros.
    Remove macros provided by LaTeX kernel.
    Improve fontification support.
    (LaTeX-fancyhdr-package-options): Add new package options.

diff --git a/style/fancyhdr.el b/style/fancyhdr.el
index 4557e3b..a9469d9 100644
--- a/style/fancyhdr.el
+++ b/style/fancyhdr.el
@@ -1,6 +1,6 @@
 ;;; fancyhdr.el --- AUCTeX style for `fancyhdr.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012, 2013, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013, 2018-2021 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -25,7 +25,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `fancyhdr.sty', version 3.2
+;; This file adds support for `fancyhdr.sty', v4.0 from 2020/01/04.
 
 ;;; Code:
 
@@ -37,83 +37,142 @@
                   "font-latex"
                   (keywords class))
 
+;; Because there can be many places, `TeX-completing-read-multiple' is
+;; used instead of just `completing-read', and a `collection' argument
+;; is provided as the list of places differs between the macros
+(defun TeX-arg-fancyhdr-place (optional
+                               &optional prompt collection full)
+  "Prompt for fancyhdr places with completion.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  If non-nil, PROMPT is
+used as the prompt.  If non-nil, COLLECTION is used as the
+completion list for the place.
+
+If FULL is non-nil, a full list of places is offered for
+completion, otherwise a reduced one omitting place combinations
+for H(eader) or F(ooter)."
+  (let* ((places (or collection
+                     ;; Standard places with no restrictions.
+                     ;; Lower-case versions, and reverse versions
+                     ;; (e.g., OC) are left out for simplicity.
+                     (if full
+                         '("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF"
+                           "C" "CO" "CE" "COH" "COF" "CEH" "CEF"
+                           "R" "RO" "RE" "ROH" "ROF" "REH" "REF")
+                       '("L" "LO" "LE" "C" "CO" "CE" "R" "RE" "RO"))))
+         (arguments (mapconcat #'identity
+                               (TeX-completing-read-multiple
+                                (TeX-argument-prompt optional
+                                                     prompt
+                                                     "Places")
+                                places)
+                               ",")))
+    (TeX-argument-insert arguments optional)))
+
+(defvar LaTeX-fancyhdr-fancypagestyle-regexp
+  '("\\\\fancypagestyle{\\([^}]+\\)}"
+    1 LaTeX-auto-pagestyle)
+  "Regexp matching the first argument of \\fancypagestyle macro.")
+
 (TeX-add-style-hook
  "fancyhdr"
  (lambda ()
    (TeX-add-symbols
-    '("lhead" t)
-    '("lfoot" t)
-    '("chead" t)
-    '("cfoot" t)
-    '("rhead" t)
-    '("rfoot" t)
-    '("nouppercase" t)
-    '("MakeUppercase" t)
-    '("fancyhead" [ TeX-arg-fancyhdr-position ] t)
-    '("fancyfoot" [ TeX-arg-fancyhdr-position ] t)
+
+    ;; 2 Using fancyhdr
+    '("fancyhead" [ TeX-arg-fancyhdr-place ] t)
+    '("fancyfoot" [ TeX-arg-fancyhdr-place ] t)
+    '("fancyhf"   [ (TeX-arg-fancyhdr-place nil nil t) ] t)
+
     '("fancyheadoffset"
-      [ (TeX-arg-fancyhdr-position
-         "Position" ("LO" "LE" "L" "RE" "RO" "R" "0")) ] t)
+      [ (TeX-arg-fancyhdr-place nil ("L" "LO" "LE" "R" "RO" "RE")) ]
+      TeX-arg-length)
     '("fancyfootoffset"
-      [ (TeX-arg-fancyhdr-position
-         "Position" ("LO" "LE" "L" "RE" "RO" "R" "O")) ] t)
+      [ (TeX-arg-fancyhdr-place nil ("LO" "LE" "L" "RO" "RE" "R")) ]
+      TeX-arg-length)
     '("fancyhfoffset"
-      [ (TeX-arg-fancyhdr-position "Position" ("E" "O" "L" "R")) ] t)
-    '("fancypagestyle" TeX-arg-pagestyle t)
-
-    "headrulewidth" "footrulewidth" "plainfootrulewidth"
-    "plainheadrulewidth" "leftmark" "rightmark"
-    ;; the manual does not mention any subsubsectionmark (!)
-    "chaptermark" "sectionmark" "subsectionmark" "paragraphmark"
-    "subparagraphmark" "footrule" "headrule")
-
-   ;; `fancyhdr.sty' supplies these two pagestyles
-   (LaTeX-add-pagestyles "fancy" "fancyplain")
+      [ (TeX-arg-fancyhdr-place nil ("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF"
+                                     "R" "RO" "RE" "ROH" "ROF" "REH" "REF")) ]
+      TeX-arg-length)
+
+    "headrulewidth" "footrulewidth"
+    "headruleskip"  "footruleskip"
+    "headrule"      "footrule"
+    "headwidth"
+
+    '("fancyheadinit" t)
+    '("fancyfootinit" t)
+    '("fancyhfinit"   t)
+
+    '("fancycenter"
+      [ TeX-arg-length "Distance" ] [ "Stretch" ] 3)
+
+    '("iftopfloat"  2)
+    '("ifbotfloat"  2)
+    '("iffloatpage" 2)
+    '("iffootnote"  2)
+
+    '("fancypagestyle"
+      ;; Always add the chosen pagestyle to list of known pagestyles,
+      ;; dupes are removed when retrieving with the function
+      ;; `LaTeX-pagestyle-list':
+      (TeX-arg-pagestyle nil t)
+      [ TeX-arg-pagestyle "Base pagestyle" ]
+      t)
+
+    ;; 15 The scoop on LATEX’s marks
+    '("nouppercase" t))
+
+   ;; 30 Deprecated commands
+   ;; Don't offer deprecated commands in V4.0 for completion anymore.
+   ;; '("lhead" t)
+   ;; '("lfoot" t)
+   ;; '("chead" t)
+   ;; '("cfoot" t)
+   ;; '("rhead" t)
+   ;; '("rfoot" t)
+   ;; "plainfootrulewidth"
+   ;; "plainheadrulewidth"
+
+   ;; `fancyhdr.sty' supplies these two pagestyles.  Pagestyle
+   ;; `fancyplain' is now deprecated.
+   (LaTeX-add-pagestyles "fancy" "fancydefault")
+
+   ;; Add \fancypagestyle{pagestyle} to AUCTeX parser
+   (TeX-auto-add-regexp LaTeX-fancyhdr-fancypagestyle-regexp)
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
               (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fancyhead" "[{")
                                 ("fancyfoot" "[{")
-                                ("lhead" "{")
-                                ("lfoot" "{")
-                                ("chead" "{")
-                                ("cfoot" "{")
-                                ("rhead" "{")
-                                ("rfoot" "{")
+                                ("fancyhf"   "[{")
                                 ("fancyheadoffset" "[{")
                                 ("fancyfootoffset" "[{")
-                                ("fancypagestyle" "{{")) 'function)
-     (font-latex-add-keywords '(("headrulewidth" "")
-                                ("footrulewidth" "")
-                                ("plainheadrulewidth" "")
-                                ("plainfootrulewidth" "")) 'variable)))
+                                ("fancyhfoffset"   "[{")
+                                ("fancyheadinit"   "{")
+                                ("fancyfootinit"   "{")
+                                ("fancyhfinit"     "{")
+                                ;; Fontify deprecated commands for
+                                ;; older documents; to be removed
+                                ;; sometimes ...
+                                ("lhead" "[{")
+                                ("lfoot" "[{")
+                                ("chead" "[{")
+                                ("cfoot" "[{")
+                                ("rhead" "[{")
+                                ("rfoot" "[{")
+                                ;; Don't fontify the last argument;
+                                ;; all macros used there should have
+                                ;; their own fontification since they
+                                ;; can also be used in a document
+                                ;; top-level.
+                                ("fancypagestyle"  "{["))
+                              'function)))
  TeX-dialect)
 
-;; Because there can be many positions, `TeX-completing-read-multiple' is used
-;; instead of just `completing-read', and a `collection' argument is provided 
as
-;; the list of positions differs between the macros
-(defun TeX-arg-fancyhdr-position (optional &optional prompt collection)
-  "Prompt for a fancyhdr position with completion.
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument, otherwise as a mandatory one.  If non-nil, PROMPT is
-used as the prompt.  If non-nil, COLLECTION is used as the
-completion list for the position."
-  (let* ((positions (if (not collection)
-                        ;; Standard positions with no restrictions.  Lower-case
-                        ;; versions, and reverse versions (e.g., OC) are left
-                        ;; out for simplicity.
-                        '("LO" "LE" "L" "CO" "CE" "C" "RE" "RO" "R")
-                      collection))
-        (arguments
-         (mapconcat 'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt optional prompt "Position")
-                     (mapcar 'list positions)) ",")))
-    (TeX-argument-insert arguments optional)))
-
-(defvar LaTeX-fancyhdr-package-options nil
-  "Package options for fancyhdr.")
+(defvar LaTeX-fancyhdr-package-options
+  '("nocheck" "compatV3" "headings" "myheadings")
+  "Package options for fancyhdr package.")
 
 ;;; fancyhdr.el ends here
-

-----------------------------------------------------------------------

Summary of changes:
 Makefile.in                      |   4 +-
 font-latex.el                    |   4 +-
 latex.el                         |   9 ++
 style/{fbox.el => extramarks.el} |  42 ++++++---
 style/fancyhdr.el                | 185 ++++++++++++++++++++++++++-------------
 5 files changed, 164 insertions(+), 80 deletions(-)
 copy style/{fbox.el => extramarks.el} (61%)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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