"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "style/minted.el" between
auctex-12.2.tar.gz and auctex-12.3.tar.gz

About: AUCTEX is an extensible package for writing and formatting TeX files in GNU Emacs and XEmacs.

minted.el  (auctex-12.2):minted.el  (auctex-12.3)
;;; minted.el --- AUCTeX style for `minted.sty' (v2.5) ;;; minted.el --- AUCTeX style for `minted.sty' (v2.5)
;; Copyright (C) 2014-2018 Free Software Foundation, Inc. ;; Copyright (C) 2014-2018, 2020 Free Software Foundation, Inc.
;; Author: Tassilo Horn <tsdh@gnu.org> ;; Author: Tassilo Horn <tsdh@gnu.org>
;; Maintainer: auctex-devel@gnu.org ;; Maintainer: auctex-devel@gnu.org
;; Created: 2014-12-19 ;; Created: 2014-12-19
;; Keywords: tex ;; Keywords: tex
;; This file is part of AUCTeX. ;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it ;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by ;; under the terms of the GNU General Public License as published by
skipping to change at line 40 skipping to change at line 40
;;; Code: ;;; Code:
(require 'tex) (require 'tex)
;; Silence the compiler: ;; Silence the compiler:
(declare-function font-latex-add-keywords (declare-function font-latex-add-keywords
"font-latex" "font-latex"
(keywords class)) (keywords class))
(declare-function font-latex-update-font-lock (declare-function font-latex-set-syntactic-keywords
"font-latex" "font-latex")
(&optional syntactic-kws))
(declare-function LaTeX-color-definecolor-list "color" ()) (declare-function LaTeX-color-definecolor-list "color" ())
(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
(declare-function LaTeX-add-newfloat-DeclareFloatingEnvironments (declare-function LaTeX-add-newfloat-DeclareFloatingEnvironments
"newfloat" (&rest newfloat-declarefloatingenvironments)) "newfloat" (&rest newfloat-declarefloatingenvironments))
(defvar font-latex-syntactic-keywords-extra) (defvar font-latex-syntactic-keywords-extra)
(defvar LaTeX-minted-key-val-options (defvar LaTeX-minted-key-val-options
'(("autogobble" ("true" "false")) '(("autogobble" ("true" "false"))
skipping to change at line 135 skipping to change at line 134
("showtabs" ("true" "false")) ("showtabs" ("true" "false"))
("space") ("space")
("spacecolor") ("spacecolor")
("startinline" ("true" "false")) ("startinline" ("true" "false"))
;; FIXME: It would be nice to use the function ;; FIXME: It would be nice to use the function
;; `LaTeX-minted-style-list' here, but with a file local var like: ;; `LaTeX-minted-style-list' here, but with a file local var like:
;; %%% TeX-command-extra-options: "-shell-escape" ;; %%% TeX-command-extra-options: "-shell-escape"
;; in a .tex file, Emacs asks to apply a variable which is not ;; in a .tex file, Emacs asks to apply a variable which is not
;; safe and does not restore the frame; the splitted frame ;; safe and does not restore the frame; the splitted frame
;; remains. I couldn't figure out why, so for now, I add the ;; remains. I couldn't figure out why, so for now, I add the
;; styles from Pygments version 2.1.3 here. ;; styles from Pygments version 2.5.2 here.
("style" ("colorful" "default" "emacs" "friendly" "fruity" "igor" ("style" ("abap" "algol" "algol_nu" "arduino" "autumn"
"lovelace" "manni" "monokai" "murphy" "native" "borland" "bw" "colorful" "default" "emacs"
"paraiso-dark" "paraiso-light" "pastie" "perldoc" "friendly" "fruity" "igor" "inkpot" "lovelace"
"rrt" "tango" "trac" "vim" "vs" "xcode")) "manni" "monokai" "murphy" "native" "paraiso-dark"
"paraiso-light" "pastie" "perldoc"
"rainbow_dash" "rrt" "sas"
"solarized-dark" "solarized-light" "stata"
"stata-dark" "stata-light"
"tango" "trac" "vim" "vs" "xcode"))
("stepnumber") ("stepnumber")
("stepnumberfromfirst") ("stepnumberfromfirst")
("stepnumberoffsetvalues" ("true" "false")) ("stepnumberoffsetvalues" ("true" "false"))
("stripall" ("true" "false")) ("stripall" ("true" "false"))
("stripnl" ("true" "false")) ("stripnl" ("true" "false"))
("tab") ("tab")
("tabcolor") ("tabcolor")
("tabsize") ("tabsize")
("texcl" ("true" "false")) ("texcl" ("true" "false"))
("texcomments" ("true" "false")) ("texcomments" ("true" "false"))
skipping to change at line 292 skipping to change at line 296
;; \newmint[macname]{foo}{opts} => \macname[key=vals]|code| ;; \newmint[macname]{foo}{opts} => \macname[key=vals]|code|
(dolist (name-lang LaTeX-minted-auto-newmint) (dolist (name-lang LaTeX-minted-auto-newmint)
(let ((lang (if (> (length (car name-lang)) 0) (let ((lang (if (> (length (car name-lang)) 0)
(car name-lang) (car name-lang)
(cadr name-lang)))) (cadr name-lang))))
(add-to-list 'TeX-auto-symbol (add-to-list 'TeX-auto-symbol
`(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local ] `(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local ]
TeX-arg-verb)) TeX-arg-verb))
(add-to-list 'LaTeX-verbatim-macros-with-delims-local lang) (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang)
(when (and (fboundp 'font-latex-add-keywords) (when (and (fboundp 'font-latex-add-keywords)
(fboundp 'font-latex-update-font-lock)
(eq TeX-install-font-lock 'font-latex-setup)) (eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords `((,lang "[")) 'textual)))) (font-latex-add-keywords `((,lang "[")) 'textual))))
;; \newmintinline{foo}{opts} => \fooinline[key=vals]|code| or ;; \newmintinline{foo}{opts} => \fooinline[key=vals]|code| or
;; \fooinline[key=vals]{code} ;; \fooinline[key=vals]{code}
;; \newmintinline[macname]{foo}{opts} => \macname[key=vals]|code| or ;; \newmintinline[macname]{foo}{opts} => \macname[key=vals]|code| or
;; \macname[key=vals]{code} ;; \macname[key=vals]{code}
(dolist (name-lang LaTeX-minted-auto-newmintinline) (dolist (name-lang LaTeX-minted-auto-newmintinline)
(let ((lang (if (> (length (car name-lang)) 0) (let ((lang (if (> (length (car name-lang)) 0)
(car name-lang) (car name-lang)
(concat (cadr name-lang) "inline")))) (concat (cadr name-lang) "inline"))))
(add-to-list 'TeX-auto-symbol (add-to-list 'TeX-auto-symbol
`(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local ] `(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local ]
TeX-arg-verb-delim-or-brace)) TeX-arg-verb-delim-or-brace))
(add-to-list 'LaTeX-verbatim-macros-with-delims-local lang) (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang)
(add-to-list 'LaTeX-verbatim-macros-with-braces-local lang) (add-to-list 'LaTeX-verbatim-macros-with-braces-local lang)
(when (and (fboundp 'font-latex-add-keywords) (when (and (fboundp 'font-latex-add-keywords)
(fboundp 'font-latex-update-font-lock)
(eq TeX-install-font-lock 'font-latex-setup)) (eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords `((,lang "[")) 'textual)))) (font-latex-add-keywords `((,lang "[")) 'textual))))
;; \newmintedfile{foo}{opts} => \foofile[key=vals]{file-name} ;; \newmintedfile{foo}{opts} => \foofile[key=vals]{file-name}
;; \newmintedfile[macname]{foo}{opts} => \macname[key=vals]{file-name} ;; \newmintedfile[macname]{foo}{opts} => \macname[key=vals]{file-name}
(dolist (name-lang LaTeX-minted-auto-newmintedfile) (dolist (name-lang LaTeX-minted-auto-newmintedfile)
(let ((lang (if (> (length (car name-lang)) 0) (let ((lang (if (> (length (car name-lang)) 0)
(car name-lang) (car name-lang)
(concat (cadr name-lang) "file")))) (concat (cadr name-lang) "file"))))
(add-to-list 'TeX-auto-symbol (add-to-list 'TeX-auto-symbol
`(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local ] `(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local ]
TeX-arg-file)))) TeX-arg-file))))
(when (and (fboundp 'font-latex-update-font-lock) (when (and (fboundp 'font-latex-set-syntactic-keywords)
(eq TeX-install-font-lock 'font-latex-setup)) (eq TeX-install-font-lock 'font-latex-setup))
;; Refresh font-locking so that the verbatim envs take effect. ;; Refresh font-locking so that the verbatim envs take effect.
(font-latex-update-font-lock t)) (font-latex-set-syntactic-keywords))
;; Also update the key=vals ;; Also update the key=vals
(LaTeX-minted-update-key-vals)) (LaTeX-minted-update-key-vals))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-minted-auto-prepare t) (add-hook 'TeX-auto-prepare-hook #'LaTeX-minted-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-minted-auto-cleanup t) (add-hook 'TeX-auto-cleanup-hook #'LaTeX-minted-auto-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(defun LaTeX-minted-add-syntactic-keywords-extra (type macro) (defun LaTeX-minted-add-syntactic-keywords-extra (type macro)
"Add MACRO from minted.sty to `font-latex-syntactic-keywords-extra'. "Add MACRO from minted.sty to `font-latex-syntactic-keywords-extra'.
TYPE is one of the symbols `brace' or `delim' indicating how TYPE is one of the symbols `brace' or `delim' indicating how
skipping to change at line 450 skipping to change at line 452
(TeX-auto-add-regexp LaTeX-minted-newmintinline-regexp) (TeX-auto-add-regexp LaTeX-minted-newmintinline-regexp)
(TeX-auto-add-regexp LaTeX-minted-newmintedfile-regexp) (TeX-auto-add-regexp LaTeX-minted-newmintedfile-regexp)
;; Filling ;; Filling
(add-to-list (make-local-variable 'LaTeX-indent-environment-list) (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
'("minted" current-indentation) t) '("minted" current-indentation) t)
(add-to-list 'LaTeX-verbatim-environments-local "minted") (add-to-list 'LaTeX-verbatim-environments-local "minted")
;; Fontification ;; Fontification
(when (and (fboundp 'font-latex-add-keywords) (when (and (fboundp 'font-latex-add-keywords)
(fboundp 'font-latex-update-font-lock)
(eq TeX-install-font-lock 'font-latex-setup)) (eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("usemintedstyle" "[{") (font-latex-add-keywords '(("usemintedstyle" "[{")
("setminted" "[{") ("setminted" "[{")
("setmintedinline" "[{") ("setmintedinline" "[{")
("newminted" "[{{") ("newminted" "[{{")
("newmint" "[{{") ("newmint" "[{{")
("newmintinline" "[{{") ("newmintinline" "[{{")
("newmintedfile" "[{{")) ("newmintedfile" "[{{"))
'function) 'function)
(font-latex-add-keywords '(("inputminted" "[{{") (font-latex-add-keywords '(("inputminted" "[{{")
skipping to change at line 473 skipping to change at line 474
'textual) 'textual)
;; Add \mint & \mintinline to ;; Add \mint & \mintinline to
;; `font-latex-syntactic-keywords-extra' and cater for their ;; `font-latex-syntactic-keywords-extra' and cater for their
;; special syntax: \mint[optional]{lang}{verbatim} or ;; special syntax: \mint[optional]{lang}{verbatim} or
;; \mint[optional]{lang}|verbatim| ;; \mint[optional]{lang}|verbatim|
(LaTeX-minted-add-syntactic-keywords-extra 'brace (LaTeX-minted-add-syntactic-keywords-extra 'brace
'("mint" "mintinline")) '("mint" "mintinline"))
(LaTeX-minted-add-syntactic-keywords-extra 'delim (LaTeX-minted-add-syntactic-keywords-extra 'delim
'("mint" "mintinline")) '("mint" "mintinline"))
;; Tell font-lock about the update. ;; Tell font-lock about the update.
(font-latex-update-font-lock t))) (font-latex-set-syntactic-keywords)))
LaTeX-dialect) LaTeX-dialect)
(defvar LaTeX-minted-package-options '("chapter" "cache" (defvar LaTeX-minted-package-options '("chapter" "cache"
"cachedir" "finalizecache" "cachedir" "finalizecache"
"frozencache" "draft" "frozencache" "draft"
"final" "kpsewhich" "final" "kpsewhich"
"langlinenos" "newfloat" "langlinenos" "newfloat"
"outputdir" "section") "outputdir" "section")
"Package options for the minted package.") "Package options for the minted package.")
 End of changes. 10 change blocks. 
16 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)