GNU bug report logs - #74939
Compiler warning for tex-font.el

Previous Next

Package: auctex;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Wed, 18 Dec 2024 09:19:02 UTC

Severity: normal

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: "auctex-bugs" <bug-auctex <at> gnu.org>
Subject: Compiler warning for tex-font.el
Date: Wed, 18 Dec 2024 10:18:08 +0100
Hi all,

Emacs from master has obsoleted usage of font-lock face variables
(3d3c109460).  Building AUCTeX with this version, the only warning
omitted is:

In tex-font-lock-syntactic-face-function:
tex-font.el:155:35: Warning: ‘font-lock-comment-face’ is an obsolete
variable (as of 31.1); use the quoted symbol instead:
'font-lock-comment-face

I think we can easily fix this with this change:

--8<---------------cut here---------------start------------->8---
diff --git a/tex-font.el b/tex-font.el
index 84dfe71b..018c6e89 100644
--- a/tex-font.el
+++ b/tex-font.el
@@ -143,16 +143,14 @@
 (defvar tex-font-lock-keywords tex-font-lock-keywords-1
   "Default expressions to highlight in TeX modes.")

-
 (defface tex-math-face
   '((t :inherit font-lock-string-face))
   "Face used to highlight TeX math expressions."
   :group 'tex)
-(defvar tex-math-face 'tex-math-face)

 ;; Use string syntax but math face for $...$.
 (defun tex-font-lock-syntactic-face-function (state)
-  (if (nth 3 state) tex-math-face font-lock-comment-face))
+  (if (nth 3 state) 'tex-math-face 'font-lock-comment-face))

 ;;;###autoload
 (defun tex-font-setup ()
--8<---------------cut here---------------end--------------->8---

Any comments?

Best, Arash




This bug report was last modified 153 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.