Variable: tex-font-lock-keywords-1

tex-font-lock-keywords-1 is a variable defined in tex-font.el.

Value

(("\\\\\\(begin\\|chapter\\|end\\|new\\(?:command\\|environment\\|theorem\\)\\|par\\(?:agraph\\|t\\)\\|renewcommand\\|s\\(?:ection\\|ub\\(?:paragraph\\|s\\(?:ection\\|ub\\(?:paragraph\\|section\\)\\)\\)\\)\\|title\\)\\*? *\\(\\[[^]]*\\] *\\)*{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)" 3 font-lock-function-name-face keep)
 ("\\\\\\(re\\)?newcommand\\** *\\(\\\\[A-Za-z@]+\\)" 2 font-lock-function-name-face keep)
 ("\\\\\\(addto\\(?:counter\\|length\\)\\|newcounter\\*?\\|set\\(?:counter\\|\\(?:leng\\|towid\\)th\\)\\) *{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)" 2 font-lock-variable-name-face)
 ("\\\\\\(bibliography\\|document\\(?:class\\|style\\)\\|epsf\\(?:ig\\)?\\|in\\(?:clude\\(?:graphics\\*?\\|only\\)?\\|put\\)\\|nofiles\\|psfig\\|usepackage\\|verbatiminput\\) *\\(\\[[^]]*\\] *\\)*{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)" 3 font-lock-builtin-face)
 ("^[   ]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)" 1 font-lock-function-name-face))

Documentation

Subdued expressions to highlight in TeX modes.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex-font.el
;;; tex-font.el --- Font-Lock support stolen from Emacs 21.  -*- lexical-binding: t; -*-
;;
;; Copyright (C) 1985-2024  Free Software Foundation, Inc.

;; Maintainer: auctex-devel@gnu.org
;; Keywords: tex, faces

;; 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 this program.  If not, see <https://www.gnu.org/licenses/>.

;;; Comments:

;; Please keep this file in sync with GNU Emacs 21.

;;; Code:

(defconst tex-font-lock-keywords-1
  (eval-when-compile
    (let* (;; Names of commands whose arg should be fontified as heading, etc.
           (headings (regexp-opt
                      '("title"  "begin" "end" "chapter" "part"
                        "section" "subsection" "subsubsection"
                        "paragraph" "subparagraph" "subsubparagraph"
                        "newcommand" "renewcommand" "newenvironment"
                        "newtheorem")
                      t))
           (variables (regexp-opt
                       '("newcounter" "newcounter*" "setcounter" "addtocounter"
                         "setlength" "addtolength" "settowidth")
                       t))
           (includes (regexp-opt
                      '("input" "include" "includeonly" "bibliography"
                        "epsfig" "psfig" "epsf" "nofiles" "usepackage"
                        "documentstyle" "documentclass" "verbatiminput"
                        "includegraphics" "includegraphics*")
                      t))
           ;; Miscellany.
           (slash "\\\\")
           (opt " *\\(\\[[^]]*\\] *\\)*")
           ;; This would allow highlighting \newcommand\CMD but requires
           ;; adapting subgroup numbers below.
           ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)"))
           (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
      (list
       ;; Heading args.
       (list (concat slash headings "\\*?" opt arg)
             ;; If ARG ends up matching too much (if the {} don't match, f.ex)
             ;; jit-lock will do funny things: when updating the buffer
             ;; the re-highlighting is only done locally so it will just
             ;; match the local line, but defer-contextually will
             ;; match more lines at a time, so ARG will end up matching
             ;; a lot more, which might suddenly include a comment
             ;; so you get things highlighted bold when you type them
             ;; but they get turned back to normal a little while later
             ;; because "there's already a face there".
             ;; Using `keep' works around this un-intuitive behavior as well
             ;; as improves the behavior in the very rare case where you do
             ;; have a comment in ARG.
             3 'font-lock-function-name-face 'keep)
       (list (concat slash "\\(re\\)?newcommand\\** *\\(\\\\[A-Za-z@]+\\)")
             2 'font-lock-function-name-face 'keep)
       ;; Variable args.
       (list (concat slash variables " *" arg) 2 'font-lock-variable-name-face)
       ;; Include args.
       (list (concat slash includes opt arg) 3 'font-lock-builtin-face)
       ;; Definitions.  I think.
       '("^[ \t]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)"
         1 font-lock-function-name-face))))
  "Subdued expressions to highlight in TeX modes.")