[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 08e7f159e8 02/15: Improve fontification of argum
From: |
ELPA Syncer |
Subject: |
[elpa] externals/auctex 08e7f159e8 02/15: Improve fontification of arguments |
Date: |
Fri, 19 Jul 2024 18:57:29 -0400 (EDT) |
branch: externals/auctex
commit 08e7f159e8abe971608aea8cd9b08ec204c8ab8e
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Improve fontification of arguments
* font-latex.el (font-latex-built-in-keyword-classes): Improve
fontification of arguments provided as macros and not inside
braces.
* tests/latex/font-latex-test.el
(font-latex-general-fontification): Adjust test.
---
font-latex.el | 6 +++---
tests/latex/font-latex-test.el | 17 ++++++++++++++++-
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index ec99d54c00..7018674883 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -241,9 +241,9 @@ variable `font-latex-fontify-sectioning'." ',num)
"makeatletter" "makeatother" "newblock" "suppressfloats" "endinput")
font-latex-warning-face 1 noarg)
("variable"
- (("setlength" "|{\\{") ("settowidth" "|{\\{") ("settoheight" "{{")
- ("settodepth" "{{") ("setcounter" "{|{\\")
- ("addtolength" "|{\\{") ("addtocounter" "{|{\\")
+ (("setlength" "|{\\|{\\") ("addtolength" "|{\\|{\\")
+ ("settowidth" "|{\\|{\\") ("settoheight" "|{\\|{\\") ("settodepth"
"|{\\|{\\")
+ ("setcounter" "{|{\\") ("addtocounter" "{|{\\")
("stepcounter" "{") ("refstepcounter" "{")
("counterwithin" "*[{{") ("counterwithout" "*[{{")
("arabic" "{") ("roman" "{") ("Roman" "{") ("alph" "{") ("Alph" "{")
diff --git a/tests/latex/font-latex-test.el b/tests/latex/font-latex-test.el
index 94150ac04d..3039bf158d 100644
--- a/tests/latex/font-latex-test.el
+++ b/tests/latex/font-latex-test.el
@@ -1,6 +1,6 @@
;;; font-latex-test.el --- tests for font-latex -*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
;; This file is part of AUCTeX.
@@ -107,6 +107,10 @@ $a$")
(font-latex-fontify-sectioning 'color))
(insert "\
\\documentclass[10pt]{article}
+
+\\setlength{\\parskip}{3cm}
+\\addtolength\\parskip\\foo
+
\\begin{document}
\\section{Macros}
@@ -186,6 +190,17 @@ x
(should (font-latex-faces-present-p 'font-lock-function-name-face))
(end-of-line)
+ ;; Test for \setlength alternatives:
+ (re-search-forward "\\\\setlength{\\\\p")
+ (should (font-latex-faces-present-p 'font-lock-variable-name-face
+ (match-end 0)))
+ (re-search-forward "\\\\addtolength\\\\p")
+ (should (font-latex-faces-present-p 'font-lock-variable-name-face
+ (match-end 0)))
+ (re-search-forward "\\\\f")
+ (should (font-latex-faces-present-p 'font-lock-variable-name-face
+ (match-end 0)))
+
;; Test for \section macro itself:
(re-search-forward "\\\\sec\\(?1:t\\)ion{")
(should (font-latex-faces-present-p 'font-lock-keyword-face
- [elpa] externals/auctex updated (3091f2ca61 -> 84e959333b), ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 34818c0307 10/15: Simplify entering of captions in optional argument, ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 70422fe0c7 12/15: * style/tabularray.el ("tabularray"): Load ninecolors.el., ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 9bc5d19aa5 13/15: ; * NEWS.org: Update the file., ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 84e959333b 15/15: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 63087fc4bf 06/15: * style/longtable.el ("longtable"): Support \LTcaptype macro., ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 922545e8af 14/15: Update style/simpleicons.el to package v13.1.0, ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 7fcab23c4b 04/15: Update style/simpleicons.el to package v13.0.0, ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 08e7f159e8 02/15: Improve fontification of arguments,
ELPA Syncer <=
- [elpa] externals/auctex 306a561ad5 03/15: Add new style/authblk.el, ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 01e3e22c7c 08/15: ; * doc/changes.texi: Wrap nil in @code and refill paragraphs., ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 7fca4a2016 01/15: Update style/acro.el to package v3.8, ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 10c8f782f8 07/15: Keep compatibility with Org mode src editing (bug#71363), ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 89fa93c4f9 05/15: ; * latex.el (TeX-arg-ref): Fix docstring., ELPA Syncer, 2024/07/19
- [elpa] externals/auctex ba84a2dbd1 09/15: Add new style/tabularray.el, ELPA Syncer, 2024/07/19
- [elpa] externals/auctex 71d25de1c6 11/15: Add new style/ninecolors.el, ELPA Syncer, 2024/07/19