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. ddd6b97c8c18cc7977622


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. ddd6b97c8c18cc797762224023753a66863e0deb
Date: Sat, 20 Dec 2014 08:09:43 +0000

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  ddd6b97c8c18cc797762224023753a66863e0deb (commit)
      from  ff1f544645c7b0f334b097bb8a9b1441fbf61b3e (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 ddd6b97c8c18cc797762224023753a66863e0deb
Author: Tassilo Horn <address@hidden>
Date:   Sat Dec 20 09:09:22 2014 +0100

    Improve minted style.
    
    * style/minted.el (LaTeX-minted-auto-cleanup): Recognize macros
    generated by \newmint, \newmintinline, and \newmintedfile, too.

diff --git a/ChangeLog b/ChangeLog
index 5bf02de..142694c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-12-20  Tassilo Horn  <address@hidden>
 
+       * style/minted.el (LaTeX-minted-auto-cleanup): Recognize macros
+       generated by \newmint, \newmintinline, and \newmintedfile, too.
+
        * tex.el (TeX-evince-sync-view): Encode URI with `url-encode-url'.
 
 2014-12-19  Tassilo Horn  <address@hidden>
diff --git a/style/minted.el b/style/minted.el
index b5733c3..dce725b 100644
--- a/style/minted.el
+++ b/style/minted.el
@@ -129,13 +129,7 @@
        LaTeX-minted-auto-newmintedfile nil))
 
 (defun LaTeX-minted-auto-cleanup ()
-  ;; (message "1: %s\n2: %s\n3: %s\n4: %s"
-  ;;      LaTeX-minted-auto-newminted
-  ;;      LaTeX-minted-auto-newmint
-  ;;      LaTeX-minted-auto-newmintinline
-  ;;      LaTeX-minted-auto-newmintedfile)
-  ;; Every \newminted{lang}{opts} defines a new langcode and a new langcode*
-  ;; env.  The starred version has mandatory args.
+  ;; \newminted{lang}{opts} => new langcode and langcode* envs.
   (dolist (lang LaTeX-minted-auto-newminted)
     (let* ((env (concat lang "code"))
           (env* (concat env "*")))
@@ -147,6 +141,17 @@
       (add-to-list 'LaTeX-indent-environment-list `(,env* current-indentation))
       (add-to-list 'LaTeX-verbatim-environments-local env)
       (add-to-list 'LaTeX-verbatim-environments-local env*)))
+  ;; \newmint{foo}{opts} => \foo|code|
+  (dolist (lang LaTeX-minted-auto-newmint)
+    (add-to-list 'TeX-auto-symbol lang)
+    (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang))
+  ;; \newmintinline{foo}{opts} => \fooinline|code|
+  (dolist (lang LaTeX-minted-auto-newmintinline)
+    (add-to-list 'TeX-auto-symbol lang)
+    (add-to-list 'LaTeX-verbatim-macros-with-delims-local (concat lang 
"inline")))
+  ;; \newmintedfile{foo}{opts} => \foofile{file-name}
+  (dolist (lang LaTeX-minted-auto-newmintedfile)
+    (add-to-list 'TeX-auto-symbol (list lang 'TeX-arg-file)))
   (when (and (fboundp 'font-latex-add-keywords)
             (fboundp 'font-latex-set-syntactic-keywords)
             (eq TeX-install-font-lock 'font-latex-setup))

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

Summary of changes:
 ChangeLog       |    3 +++
 style/minted.el |   19 ++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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