auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. cfb6b1fb5bf1d04aae828


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. cfb6b1fb5bf1d04aae82856ef30f73a83b9d1938
Date: Fri, 22 May 2020 15:25:45 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  cfb6b1fb5bf1d04aae82856ef30f73a83b9d1938 (commit)
      from  c31faf7a78d6b4a12ad24c0c2d8c2e2dfedfd53c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cfb6b1fb5bf1d04aae82856ef30f73a83b9d1938
Author: Arash Esbati <address@hidden>
Date:   Fri May 22 21:24:42 2020 +0200

    Fontify content of comment environment
    
    * style/verbatim.el ("verbatim"): Add fontification support for
    comment environment.  Delete unnecessary `function' in the hook.

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

-----------------------------------------------------------------------

Summary of changes:
 style/verbatim.el | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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