auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 50c0fb3d31 46/48: * style/afterpage.el ("afterpa


From: Tassilo Horn
Subject: [elpa] externals/auctex 50c0fb3d31 46/48: * style/afterpage.el ("afterpage"): Fontify the only macro.
Date: Fri, 18 Nov 2022 14:27:46 -0500 (EST)

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

    * style/afterpage.el ("afterpage"): Fontify the only macro.
---
 style/afterpage.el | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/style/afterpage.el b/style/afterpage.el
index 1601885fd5..88ea2c10c7 100644
--- a/style/afterpage.el
+++ b/style/afterpage.el
@@ -1,6 +1,6 @@
 ;;; afterpage.el --- AUCTeX style for `afterpage.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2013, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2013--2022 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -31,13 +31,25 @@
 ;;; Code:
 
 (require 'tex)
-(require 'latex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "afterpage"
  (lambda ()
    (TeX-add-symbols
-    '("afterpage" t)))
+    '("afterpage" t))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     ;; Don't fontify the argument since it will contain (La)TeX code
+     ;; which probably has its own fontification:
+     (font-latex-add-keywords '(("afterpage" ""))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-afterpage-package-options nil




reply via email to

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