[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex cfb6b1f 7/9: Fontify content of comment environm
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex cfb6b1f 7/9: Fontify content of comment environment |
Date: |
Sun, 24 May 2020 03:27:54 -0400 (EDT) |
branch: externals/auctex
commit cfb6b1fb5bf1d04aae82856ef30f73a83b9d1938
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Fontify content of comment environment
* style/verbatim.el ("verbatim"): Add fontification support for
comment environment. Delete unnecessary `function' in the hook.
---
style/verbatim.el | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/style/verbatim.el b/style/verbatim.el
index 1fb7bdd..8491dfe 100644
--- a/style/verbatim.el
+++ b/style/verbatim.el
@@ -1,6 +1,6 @@
;;; verbatim.el --- Style hook for the verbatim package.
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2020 Free Software Foundation, Inc.
;; Author: Masayuki Ataka <address@hidden>
;; Maintainer: address@hidden
@@ -29,13 +29,28 @@
;;; Code
-(TeX-add-style-hook "verbatim"
- (function
- (lambda ()
- (LaTeX-add-environments
- "comment")
- (TeX-add-symbols
- '("verbatiminput" TeX-arg-file))))
+(TeX-add-style-hook
+ "verbatim"
+ (lambda ()
+ (LaTeX-add-environments
+ "comment")
+ (TeX-add-symbols
+ '("verbatiminput" TeX-arg-file))
+
+ ;; Fontification:
+ ;; Code taken from `comment.sty'
+ (when (and (boundp 'font-latex-syntactic-keywords-extra)
+ (fboundp 'font-latex-update-font-lock)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ ;; For syntactic fontification.
+ (add-to-list 'font-latex-syntactic-keywords-extra
+ '("^[ \t]*\\\\begin *{comment}.*\\(\n\\)"
+ (1 "!" t)))
+ (add-to-list 'font-latex-syntactic-keywords-extra
+ '("^[ \t]*\\(\\\\\\)end *{comment}"
+ (1 "!" t)))
+ ;; Tell font-lock about the update.
+ (font-latex-update-font-lock t)))
LaTeX-dialect)
(defvar LaTeX-verbatim-package-options nil
- [elpa] externals/auctex updated (cfd58ec -> 2dcb42e), Tassilo Horn, 2020/05/24
- [elpa] externals/auctex 3244226 2/9: Update all mode lines, Tassilo Horn, 2020/05/24
- [elpa] externals/auctex cfb6b1f 7/9: Fontify content of comment environment,
Tassilo Horn <=
- [elpa] externals/auctex a12c790 1/9: ; * style/preview.el: Fix fontification for \PreviewSnarfEnvironment., Tassilo Horn, 2020/05/24
- [elpa] externals/auctex edc7e0e 3/9: ; * preview.el.in (): Update copyright year., Tassilo Horn, 2020/05/24
- [elpa] externals/auctex cb505df 4/9: Modernize font-latex.el, Tassilo Horn, 2020/05/24
- [elpa] externals/auctex 6e99536 5/9: Empty commit fixing ChangeLog., Tassilo Horn, 2020/05/24
- [elpa] externals/auctex c31faf7 6/9: ; Cosmetic change, Tassilo Horn, 2020/05/24
- [elpa] externals/auctex a9fd06c 8/9: ; * style/verbatim.el ("verbatim"): Fix comment., Tassilo Horn, 2020/05/24
- [elpa] externals/auctex 2dcb42e 9/9: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2020/05/24