"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "style/fancyvrb.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.

fancyvrb.el  (auctex-12.2):fancyvrb.el  (auctex-12.3)
;;; fancyvrb.el --- AUCTeX style for `fancyvrb.sty' version 3.0. ;;; fancyvrb.el --- AUCTeX style for `fancyvrb.sty' version 3.0.
;; Copyright (C) 2013, 2014, 2016--2018 Free Software Foundation, Inc. ;; Copyright (C) 2013, 2014, 2016-2018, 2020 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org ;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <mose@gnu.org> ;; Author: Mosè Giordano <mose@gnu.org>
;; 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
;; the Free Software Foundation; either version 3, or (at your option) ;; the Free Software Foundation; either version 3, or (at your option)
skipping to change at line 55 skipping to change at line 55
;; Needed for auto-parsing: ;; Needed for auto-parsing:
(require 'tex) (require 'tex)
(require 'latex) (require 'latex)
;; 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))
(defvar LaTeX-fancyvrb-key-val-options (defvar LaTeX-fancyvrb-key-val-options
`(("commentchar" ("none")) `(("commentchar" ("none"))
("gobble") ("gobble")
("formatcom") ("formatcom")
;; Undocumented key ;; Undocumented key
("formatcom*") ("formatcom*")
("fontfamily" ("tt" "courier" "helvetica")) ("fontfamily" ("tt" "courier" "helvetica"))
("fontsize" ("auto" "\\tiny" "\\scriptsize" ("fontsize" ("auto" "\\tiny" "\\scriptsize"
"\\footnotesize" "\\small" "\\normalsize" "\\footnotesize" "\\small" "\\normalsize"
skipping to change at line 250 skipping to change at line 249
(setq TeX-symbol-list (setq TeX-symbol-list
(assq-delete-all (car (assoc mac-name (TeX-symbol-list))) TeX-symbo l-list))) (assq-delete-all (car (assoc mac-name (TeX-symbol-list))) TeX-symbo l-list)))
;; Now add the new item: Start with new macros for loading ;; Now add the new item: Start with new macros for loading
;; files: ;; files:
(cond ((member base-mac '("VerbatimInput" "BVerbatimInput" "LVerbatimInput ")) (cond ((member base-mac '("VerbatimInput" "BVerbatimInput" "LVerbatimInput "))
(TeX-add-symbols (TeX-add-symbols
`(,mac-name `(,mac-name
[ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
LaTeX-fancyvrb-arg-file-relative)) LaTeX-fancyvrb-arg-file-relative))
(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))
(font-latex-add-keywords `((,mac-name "[{")) (font-latex-add-keywords `((,mac-name "[{"))
'reference))) 'reference)))
;; New macros for saving verbatim text: ;; New macros for saving verbatim text:
((string= base-mac "SaveVerb") ((string= base-mac "SaveVerb")
(TeX-add-symbols (TeX-add-symbols
`(,mac-name `(,mac-name
[ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
(TeX-arg-eval (TeX-arg-eval
(lambda () (lambda ()
(let ((name (TeX-read-string (let ((name (TeX-read-string
(TeX-argument-prompt optional nil "Save name")))) (TeX-argument-prompt optional nil "Save name"))))
(LaTeX-add-fancyvrb-saveverbs name) (LaTeX-add-fancyvrb-saveverbs name)
(format "%s" name)))) (format "%s" name))))
TeX-arg-verb)) TeX-arg-verb))
(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))
(font-latex-add-keywords `((,mac-name "[{")) (font-latex-add-keywords `((,mac-name "[{"))
'textual))) 'textual)))
;; New macros for using previously saved text: ;; New macros for using previously saved text:
((string= base-mac "UseVerb") ((string= base-mac "UseVerb")
(TeX-add-symbols (TeX-add-symbols
`(,mac-name `(,mac-name
(TeX-arg-eval (TeX-arg-eval
completing-read completing-read
(TeX-argument-prompt optional nil "Saved name") (TeX-argument-prompt optional nil "Saved name")
(LaTeX-fancyvrb-saveverb-list)))) (LaTeX-fancyvrb-saveverb-list))))
(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))
(font-latex-add-keywords `((,mac-name "{")) (font-latex-add-keywords `((,mac-name "{"))
'textual))) 'textual)))
;; Anything else is considered as verbatim typesetting macro: ;; Anything else is considered as verbatim typesetting macro:
(t (t
(TeX-add-symbols (TeX-add-symbols
`(,mac-name `(,mac-name
[ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
TeX-arg-verb) TeX-arg-verb)
;; Defined macros have a starred version where the ;; Defined macros have a starred version where the
;; `showspaces' key is set to true ;; `showspaces' key is set to true
`(,(concat mac-name "*") `(,(concat mac-name "*")
[ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
TeX-arg-verb)) TeX-arg-verb))
(add-to-list 'LaTeX-verbatim-macros-with-delims-local (add-to-list 'LaTeX-verbatim-macros-with-delims-local
mac-name t) mac-name t)
(add-to-list 'LaTeX-verbatim-macros-with-delims-local (add-to-list 'LaTeX-verbatim-macros-with-delims-local
(concat mac-name "*") t) (concat mac-name "*") t)
(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))
(font-latex-add-keywords `((,mac-name "*[")) (font-latex-add-keywords `((,mac-name "*["))
'textual)))))) 'textual))))))
;; Update font-lock: ;; Update font-lock:
(when (and (fboundp 'font-latex-add-keywords) (when (and (fboundp 'font-latex-set-syntactic-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-update-font-lock t))) (font-latex-set-syntactic-keywords)))
(defun LaTeX-fancyvrb-arg-define-environment (optional &optional cleanup) (defun LaTeX-fancyvrb-arg-define-environment (optional &optional cleanup)
"Query and insert a new verbatim environment with fancyvrb package. "Query and insert a new verbatim environment with fancyvrb package.
If OPTIONAL is non-nil, insert the arguments in brackets. If If OPTIONAL is non-nil, insert the arguments in brackets. If
CLEANUP is non-nil, do not insert any arguments in the buffer and CLEANUP is non-nil, do not insert any arguments in the buffer and
update only various AUCTeX variables for verbatim environments." update only various AUCTeX variables for verbatim environments."
(unless cleanup (unless cleanup
(let ((new-env (TeX-read-string (let ((new-env (TeX-read-string
(TeX-argument-prompt optional nil "New verbatim environment") )) (TeX-argument-prompt optional nil "New verbatim environment") ))
(base-env (completing-read (base-env (completing-read
skipping to change at line 371 skipping to change at line 369
(LaTeX-add-environments (LaTeX-add-environments
`(,(concat env "*") LaTeX-env-args `(,(concat env "*") LaTeX-env-args
[ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ])) [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]))
(add-to-list 'LaTeX-verbatim-environments-local (concat env "*")) (add-to-list 'LaTeX-verbatim-environments-local (concat env "*"))
(add-to-list 'LaTeX-indent-environment-list (add-to-list 'LaTeX-indent-environment-list
`(,(concat env "*") current-indentation) t))) `(,(concat env "*") current-indentation) t)))
;; These apply for all environments defined: ;; These apply for all environments defined:
(add-to-list 'LaTeX-verbatim-environments-local env) (add-to-list 'LaTeX-verbatim-environments-local env)
(add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) t) )) (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) t) ))
;; Update font-lock: ;; Update font-lock:
(when (and (fboundp 'font-latex-add-keywords) (when (and (fboundp 'font-latex-set-syntactic-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-update-font-lock t))) (font-latex-set-syntactic-keywords)))
(defun LaTeX-fancyvrb-arg-file-relative (optional) (defun LaTeX-fancyvrb-arg-file-relative (optional)
"Query and insert a file name relative to current master file. "Query and insert a file name relative to current master file.
If OPTIONAL is non-nil, insert the file name in brackets." If OPTIONAL is non-nil, insert the file name in brackets."
(TeX-argument-insert (TeX-argument-insert
(file-relative-name (file-relative-name
(read-file-name (TeX-argument-prompt optional nil "File")) (read-file-name (TeX-argument-prompt optional nil "File"))
(TeX-master-directory)) (TeX-master-directory))
optional)) optional))
skipping to change at line 533 skipping to change at line 530
(add-to-list 'LaTeX-indent-environment-list '("BVerbatim*" current-indentatio n) t) (add-to-list 'LaTeX-indent-environment-list '("BVerbatim*" current-indentatio n) t)
(add-to-list 'LaTeX-indent-environment-list '("LVerbatim" current-indentation ) t) (add-to-list 'LaTeX-indent-environment-list '("LVerbatim" current-indentation ) t)
(add-to-list 'LaTeX-indent-environment-list '("LVerbatim*" current-indentatio n) t) (add-to-list 'LaTeX-indent-environment-list '("LVerbatim*" current-indentatio n) t)
(add-to-list 'LaTeX-indent-environment-list '("SaveVerbatim" current-indentat ion) t) (add-to-list 'LaTeX-indent-environment-list '("SaveVerbatim" current-indentat ion) t)
(add-to-list 'LaTeX-indent-environment-list '("VerbatimOut" current-indentati on) t) (add-to-list 'LaTeX-indent-environment-list '("VerbatimOut" current-indentati on) t)
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "Verb") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "Verb")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "Verb*") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "Verb*")
;; 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 '(("CustomVerbatimCommand" "|{\\{{") (font-latex-add-keywords '(("CustomVerbatimCommand" "|{\\{{")
("RecustomVerbatimCommand" "|{\\{{") ("RecustomVerbatimCommand" "|{\\{{")
("DefineVerbatimEnvironment" "{{{") ("DefineVerbatimEnvironment" "{{{")
("RecustomVerbatimEnvironment" "{{{") ("RecustomVerbatimEnvironment" "{{{")
("DefineShortVerb" "{") ("DefineShortVerb" "{")
("UndefineShortVerb" "{") ("UndefineShortVerb" "{")
("fvset" "{")) ("fvset" "{"))
'function) 'function)
(font-latex-add-keywords '(("VerbatimInput" "[{") (font-latex-add-keywords '(("VerbatimInput" "[{")
("BVerbatimInput" "[{") ("BVerbatimInput" "[{")
("LVerbatimInput" "[{")) ("LVerbatimInput" "[{"))
'reference) 'reference)
(font-latex-add-keywords '(("Verb" "*[") ; The second argument is verbatim. (font-latex-add-keywords '(("Verb" "*[") ; The second argument is verbatim.
("SaveVerb" "[{") ("SaveVerb" "[{")
("UseVerb" "{") ("UseVerb" "{")
("UseVerbatim" "{") ("UseVerbatim" "{")
("LUseVerbatim" "{") ("LUseVerbatim" "{")
("BUseVerbatim" "{")) ("BUseVerbatim" "{"))
'textual) 'textual)))
;; Tell font-lock about the update.
(font-latex-update-font-lock t)))
LaTeX-dialect) LaTeX-dialect)
(defvar LaTeX-fancyvrb-package-options nil (defvar LaTeX-fancyvrb-package-options nil
"Package options for the fancyvrb package.") "Package options for the fancyvrb package.")
;;; fancyvrb.el ends here ;;; fancyvrb.el ends here
 End of changes. 12 change blocks. 
18 lines changed or deleted 12 lines changed or added

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