auctex-devel
[Top][All Lists]
Advanced

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

font-latex.el: Introducing new keyword class 'function-noarg'


From: Arash Esbati
Subject: font-latex.el: Introducing new keyword class 'function-noarg'
Date: Thu, 04 May 2023 22:08:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi all,

there is a fixme in function class of
`font-latex-built-in-keyword-classes' which says:

  ;; XXX: Should macros without arguments rather be listed in a
  ;; separate category with 'noarg instead of 'command handling?

The way I see it, fixing this should be easy.  Does anybody object if I
install the patch attached (docstring and manual adjustments will
follow)?  There will be also some work in AUCTeX's style files, but that
can happen gradually.

Any comments welcome.

Best, Arash
diff --git a/font-latex.el b/font-latex.el
index ee6d06f8..29ba6536 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -365,22 +365,24 @@ variable `font-latex-fontify-sectioning'." ',num)
       ("labelformat" "{{") ("linespread" "{")
       ("AddToHook" "{[{") ("RemoveFromHook" "{[") ("AddToHookNext" "{{")
       ("ProvidesClass" "{[") ("ProvidesPackage" "{[") ("ProvidesFile" "{[")
-      ("NewMarkClass" "{")
-      ;; XXX: Should macros without arguments rather be listed in a
-      ;; separate category with 'noarg instead of 'command handling?
-      ("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "")
-      ("bigskip" "") ("medskip" "")  ("smallskip" "")
-      ("thinspace" "")  ("negthinspace" "")
-      ("thicklines" "") ("thinlines" "")
-      ("noindent" "") ("hline" "") ("ldots" "")
-      ("centering" "") ("raggedright" "") ("raggedleft" "")
-      ("raggedbottom" "") ("flushbottom" "")
-      ("TeX" "") ("LaTeX" "") ("LaTeXe" "")
-      ("normalfont" "") ("normalshape" "")
-      ("tableofcontents" "") ("listoffigures" "") ("listoftables" "")
-      ("maketitle" "") ("makeindex" "") ("makeglossary" "")
-      ("sloppy" "") ("fussy" ""))
+      ("NewMarkClass" "{"))
      font-lock-function-name-face 2 command)
+    ("function-noarg"
+     (;; XXX: Should macros without arguments rather be listed in a
+      ;; separate category with 'noarg instead of 'command handling?
+      "enspace" "enskip" "quad" "qquad" "nonumber"
+      "bigskip" "medskip"  "smallskip"
+      "thinspace"  "negthinspace"
+      "thicklines" "thinlines"
+      "noindent" "hline" "ldots"
+      "centering" "raggedright" "raggedleft"
+      "raggedbottom" "flushbottom"
+      "TeX" "LaTeX" "LaTeXe"
+      "normalfont" "normalshape"
+      "tableofcontents" "listoffigures" "listoftables"
+      "maketitle" "makeindex" "makeglossary"
+      "sloppy" "fussy")
+     font-lock-keyword-face 2 noarg)
     ("sectioning-0"
      (("part" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)

reply via email to

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