"Fossies" - the Fresh Open Source Software Archive  

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

listings.el  (auctex-12.2):listings.el  (auctex-12.3)
;;; listings.el --- AUCTeX style for `listings.sty' ;;; listings.el --- AUCTeX style for `listings.sty'
;; Copyright (C) 2004, 2005, 2009, 2013--2019 Free Software Foundation, Inc. ;; Copyright (C) 2004, 2005, 2009, 2013-2020 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
;; Maintainer: auctex-devel@gnu.org ;; Maintainer: auctex-devel@gnu.org
;; Created: 2004-10-17 ;; Created: 2004-10-17
;; 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 58 skipping to change at line 58
;; 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))
;; The following are options taken from chapter 4 of the listings ;; The following are options taken from chapter 4 of the listings
;; manual (2007/02/22 Version 1.4). ;; manual (2007/02/22 Version 1.4).
(defvar LaTeX-listings-key-val-options (defvar LaTeX-listings-key-val-options
'(;; Space and placement '(;; Space and placement
("float" ("t" "b" "p" "h")) ; Support [*] as an optional prefix and that ("float" ("t" "b" "p" "h")) ; Support [*] as an optional prefix and that
; tbph are not exclusive. ; tbph are not exclusive.
("floatplacement" ("t" "b" "p" "h")) ("floatplacement" ("t" "b" "p" "h"))
("aboveskip") ("aboveskip")
("belowskip") ("belowskip")
("lineskip") ("lineskip")
("boxpos" ("b" "c" "t")) ("boxpos" ("b" "c" "t"))
;; The printed range ;; The printed range
("print" ("true" "false")) ("print" ("true" "false"))
("firstline") ("firstline")
("lastline") ("lastline")
("linerange") ("linerange")
("consecutivenumbers" ("true" "false"))
("showlines" ("true" "false")) ("showlines" ("true" "false"))
("emptylines") ("emptylines")
("gobble") ("gobble")
;; Languages and styles ;; Languages and styles
("style") ("style")
("language") ("language")
("alsolanguage") ("alsolanguage")
("defaultdialect") ("defaultdialect")
("printpod" ("true" "false")) ("printpod" ("true" "false"))
("usekeywordsintag" ("true" "false")) ("usekeywordsintag" ("true" "false"))
skipping to change at line 339 skipping to change at line 339
(LaTeX-extract-key-value-label)) (LaTeX-extract-key-value-label))
1 LaTeX-auto-label)) 1 LaTeX-auto-label))
;; Tell RefTeX ;; Tell RefTeX
(when (fboundp 'reftex-add-label-environments) (when (fboundp 'reftex-add-label-environments)
(reftex-add-label-environments (reftex-add-label-environments
`((,env ?l "lst:" "~\\ref{%s}" `((,env ?l "lst:" "~\\ref{%s}"
LaTeX-listings-reftex-label-context-function LaTeX-listings-reftex-label-context-function
(regexp "[Ll]isting"))))) (regexp "[Ll]isting")))))
;; 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))
;; Tell font-lock about the update. ;; Tell font-lock about the update.
(font-latex-update-font-lock t)) (font-latex-set-syntactic-keywords))
;; Add new env's to `ispell-tex-skip-alist': skip the entire env ;; Add new env's to `ispell-tex-skip-alist': skip the entire env
(TeX-ispell-skip-setcdr `(,(cons env (concat "\\\\end{" env "}")))))) (TeX-ispell-skip-setcdr `(,(cons env (concat "\\\\end{" env "}"))))))
(when (LaTeX-listings-lstdefinestyle-list) (when (LaTeX-listings-lstdefinestyle-list)
(LaTeX-listings-update-style-key))) (LaTeX-listings-update-style-key)))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-listings-auto-prepare t) (add-hook 'TeX-auto-prepare-hook #'LaTeX-listings-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-listings-auto-cleanup t) (add-hook 'TeX-auto-cleanup-hook #'LaTeX-listings-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-listings-reftex-label-context-function (env) (defun LaTeX-listings-reftex-label-context-function (env)
skipping to change at line 423 skipping to change at line 422
"lstlistoflistings" "lstlistoflistings"
'("lstnewenvironment" "Name" ["Number or arguments"] ["Default argument"] '("lstnewenvironment" "Name" ["Number or arguments"] ["Default argument"]
"Starting code" "Ending code") "Starting code" "Ending code")
'("lstset" (TeX-arg-key-val LaTeX-listings-key-val-options-local)) '("lstset" (TeX-arg-key-val LaTeX-listings-key-val-options-local))
'("lstloadlanguages" t) '("lstloadlanguages" t)
;; 4.17 Short Inline Listing Commands ;; 4.17 Short Inline Listing Commands
'("lstMakeShortInline" [ "Options" ] "Character") '("lstMakeShortInline" [ "Options" ] "Character")
'("lstDeleteShortInline" "Character") '("lstDeleteShortInline" "Character")
"lstgrinddeffile" "lstaspectfiles" "lstlanguagefiles" "lstgrinddeffile" "lstaspectfiles" "lstlanguagefiles"
"lstlistingname" "lstlistlistingname") "lstlistingname" "lstlistingnamestyle" "thelstlisting"
"lstlistlistingname")
;; New environments ;; New environments
(LaTeX-add-environments (LaTeX-add-environments
'("lstlisting" LaTeX-env-args '("lstlisting" LaTeX-env-args
[TeX-arg-key-val LaTeX-listings-key-val-options-local] [TeX-arg-key-val LaTeX-listings-key-val-options-local]
(LaTeX-env-label-as-keyval "caption"))) (LaTeX-env-label-as-keyval "caption")))
;; Append "lstlisting" to `LaTeX-label-alist': ;; Append "lstlisting" to `LaTeX-label-alist':
(add-to-list 'LaTeX-label-alist '("lstlisting" . LaTeX-listing-label) t) (add-to-list 'LaTeX-label-alist '("lstlisting" . LaTeX-listing-label) t)
skipping to change at line 452 skipping to change at line 452
;; `reftex-label-alist-builtin'. We add the same thing here only ;; `reftex-label-alist-builtin'. We add the same thing here only
;; with our function as 5th element: ;; with our function as 5th element:
(when (fboundp 'reftex-add-label-environments) (when (fboundp 'reftex-add-label-environments)
(reftex-add-label-environments (reftex-add-label-environments
'(("lstlisting" ?l "lst:" "~\\ref{%s}" '(("lstlisting" ?l "lst:" "~\\ref{%s}"
LaTeX-listings-reftex-label-context-function LaTeX-listings-reftex-label-context-function
(regexp "[Ll]isting"))))) (regexp "[Ll]isting")))))
;; 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 '(("lstnewenvironment" "{[[{{")) 'function) (font-latex-add-keywords '(("lstnewenvironment" "{[[{{")) 'function)
(font-latex-add-keywords '(("lstinputlisting" "[{")) 'reference) (font-latex-add-keywords '(("lstinputlisting" "[{")) 'reference)
(font-latex-add-keywords '(("lstinline" "[") (font-latex-add-keywords '(("lstinline" "[")
("lstlistoflistings" "")) ("lstlistoflistings" ""))
'textual) 'textual)
(font-latex-add-keywords '(("lstalias" "{{") (font-latex-add-keywords '(("lstalias" "{{")
("lstdefinestyle" "{{") ("lstdefinestyle" "{{")
("lstset" "{")) ("lstset" "{"))
'variable) 'variable)))
;; Tell font-lock about the update.
(font-latex-update-font-lock t)))
LaTeX-dialect) LaTeX-dialect)
(defvar LaTeX-listings-package-options '("draft" "final" "savemem" (defvar LaTeX-listings-package-options '("draft" "final" "savemem"
"noaspects" "noaspects"
;; procnames is mentioned in ;; procnames is mentioned in
;; Section 5.2 ;; Section 5.2
"procnames") "procnames")
"Package options for the listings package.") "Package options for the listings package.")
;;; listings.el ends here ;;; listings.el ends here
 End of changes. 8 change blocks. 
11 lines changed or deleted 8 lines changed or added

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