Ticket #34846: biber.patch
File biber.patch, 22.1 KB (added by seanfarley (Sean Farley), 12 years ago) |
---|
-
font-latex.el
# HG changeset patch # User Sean Farley <sean@mcs.anl.gov> # Date 1332968200 18000 # Node ID c82ba3c6d98c5b31831a4d6afa444cbc7670e774 # Parent bfcf214b682c56af0b06597801d414c1a7319bb2 biber: add support for biblatex diff --git a/font-latex.el b/font-latex.el
a b 289 289 ("addtolength" "|{\\{") ("addtocounter" "{|{\\") 290 290 ("stepcounter" "{") ("refstepcounter" "{") 291 291 ("arabic" "{") ("roman" "{") ("Roman" "{") ("alph" "{") ("Alph" "{") 292 292 ("fnsymbol" "{")) 293 293 'font-lock-variable-name-face 2 command) 294 ("biblatexnoarg" 295 ("newrefsegment" "mancite" "pno" "ppno" "nopp" "psq" "psqq") 296 'font-lock-variable-name-face 2 noarg) 297 ("biblatex" 298 (("newrefsection" "[") ("ExecuteBibliographyOptions" "[{") 299 ("printbibliography" "[") ("printshorthands" "[") ("printbibheading" "[") 300 ("addbibresource" "[{") ("addglobalbib" "[{") ("addsectionbib" "[{") 301 ("bibbysection" "[") ("bibbysegment" "[") ("bibbycategory" "[") 302 ("DeclareBibliographyCategory" "{") ("addtocategory" "{{") ("defbibenvironment" "{{{{") 303 ("defbibheading" "{[{") ("defbibnote" "{{") ("defbibfilter" "{{") ("defbibcheck" "{{") 304 ("defbibentryset" "{{") ("Cite" "[[{") ("parencite" "*[[{") ("Parencite" "[[{") 305 ("footcite" "[[{") ("footcitetext" "[[{") ("textcite" "[[{") ("Textcite" "[[{") 306 ("smartcite" "[[{") ("Smartcite" "[[{") ("supercite" "{") ("autocite" "*[[{") 307 ("Autocite" "*[[{") ("citeauthor" "[[{") ("Citeauthor" "[[{") ("citetitle" "*[[{") 308 ("citeyear" "[[{") ("citedate" "[[{") ("citeurl" "[[{") ("parentext" "{") 309 ("brackettext" "{") ("fullcite" "[[{") ("fullfootcite" "[[{") ("volcite" "[{[[") 310 ("Volcite" "[{[[") ("pvolcite" "[{[[") ("Pvolcite" "[{[[") ("fvolcite" "[{[[") 311 ("ftvolcite" "[{[[") ("svolcite" "[{[[") ("Svolcite" "[{[[") ("tvolcite" "[{[[") 312 ("Tvolcite" "[{[[") ("avolcite" "[{[[") ("Avolcite" "[{[[") ("notecite" "[[{") 313 ("Notecite" "[[{") ("pnotecite" "[[{") ("Pnotecite" "[[{") ("fnotecite" "[[{") 314 ("citename" "[[{[{") ("citelist" "[[{[{") ("citefield" "[[{[{") ("citereset" "*") 315 ("RN" "{") ("Rn" "{") ("DefineBibliographyStrings" "{{") ("DefineBibliographyExtras" "{{") 316 ("UndefineBibliographyExtras" "{{") ("DefineHyphenationExceptions" "{{") 317 ("NewBibliographyString" "{") ("autocites" "(([[{") ("Autocites" "(([[{") 318 ("cites" "(([[{") ("Cites" "(([[{") ("parencites" "(([[{") ("Parencites" "(([[{") 319 ("footcites" "(([[{") ("footcitetexts" "(([[{") ("smartcites" "(([[{") 320 ("Smartcites" "(([[{") ("textcites" "(([[{") ("Textcites" "(([[{") ("supercites" "(([[{")) 321 'font-lock-constant-face 2 command) 294 322 ("reference" 295 (("nocite" " {") ("cite" "[{") ("label" "{") ("pageref" "{")323 (("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{") 296 324 ("vref" "{") ("eqref" "{") ("ref" "{") ("include" "{") 297 325 ("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{") 298 326 ("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{")) 299 327 'font-lock-constant-face 2 command) 300 328 ("function" … … 793 821 794 822 (defun font-latex-add-keywords (keywords class) 795 823 "Add KEYWORDS to CLASS. 796 824 KEYWORDS is a list of keywords or keywords with syntax specs. 797 825 CLASS corresponds to a keyword class and can be one of the 798 symbols 'warning, 'variable, 'reference, ' function, sectioning-0,826 symbols 'warning, 'variable, 'reference, 'biblatex, 'function, sectioning-0, 799 827 'sectioning-1, 'sectioning-2, 'sectioning-3, 'sectioning-4, 800 828 'sectioning-5, 'slide-title, 'textual, 'bold-command, 801 829 'italic-command, 'math-command, 'type-command, 'bold-declaration, 802 830 'italic-declaration or 'type-declaration. 803 831 -
latex.el
diff --git a/latex.el b/latex.el
a b 1210 1210 ("\\\\include{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}" 1211 1211 1 TeX-auto-file) 1212 1212 (, (concat "\\\\bibitem{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}") 1 LaTeX-auto-bibitem) 1213 1213 (, (concat "\\\\bibitem\\[[^][\n\r]+\\]{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}") 1214 1214 1 LaTeX-auto-bibitem) 1215 ("\\\\bibliography{\\([^#}\\\\\n\r]+\\)}" 1 LaTeX-auto-bibliography))) 1215 ("\\\\bibliography{\\([^#}\\\\\n\r]+\\)}" 1 LaTeX-auto-bibliography) 1216 ("\\\\addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\\\\\n\r\.]+\\)\\..+}" 1 LaTeX-auto-bibliography) 1217 ("\\\\add\\(?:global\\|section\\)bib\\(?:\\[[^]]+\\]\\)?{\\([^#}\\\\\n\r\.]+\\)\\(?:\\..+\\)?}" 1 LaTeX-auto-bibliography) 1218 ("\\\\newrefsection\\[\\([^]]+\\)\\]" 1 LaTeX-split-bibs) 1219 ("\\\\begin{refsection}\\[\\([^]]+\\)\\]" 1 LaTeX-split-bibs) 1220 ("backend=\\(biber\\)" 1 LaTeX-using-Biber) 1221 ("\\\\ExecuteBibliographyOptions\\(?:\\[[^]]+\\]\\)?{.*?backend=\\(biber\\)}" 1 LaTeX-using-Biber))) 1216 1222 LaTeX-auto-class-regexp-list 1217 1223 LaTeX-auto-label-regexp-list 1218 1224 LaTeX-auto-index-regexp-list 1219 1225 LaTeX-auto-minimal-regexp-list) 1220 1226 "List of regular expression matching common LaTeX macro definitions.") 1221 1227 1228 (defun LaTeX-split-bibs (match) 1229 (let ((bibs (TeX-split-string " *, *" (TeX-match-buffer match)))) 1230 (dolist (bib bibs) 1231 (LaTeX-add-bibliographies (replace-regexp-in-string 1232 (concat "\\(?:\\." 1233 (mapconcat 'regexp-quote 1234 BibTeX-Biber-file-extensions 1235 "\\|\\.") 1236 "\\)") 1237 "" bib))))) 1238 1222 1239 (defun LaTeX-auto-prepare () 1223 1240 "Prepare for LaTeX parsing." 1224 1241 (setq LaTeX-auto-arguments nil 1225 1242 LaTeX-auto-optional nil 1226 1243 LaTeX-auto-env-args nil … … 1246 1263 opts)) 1247 1264 1248 1265 (defun LaTeX-auto-cleanup () 1249 1266 "Cleanup after LaTeX parsing." 1250 1267 1251 ;; Cleanup BibTeX files1268 ;; Cleanup BibTeX/Biber files 1252 1269 (setq LaTeX-auto-bibliography 1253 1270 (apply 'append (mapcar (lambda (arg) 1254 1271 (TeX-split-string "," arg)) 1255 1272 LaTeX-auto-bibliography))) 1256 1273 … … 1359 1376 (add-to-list 'LaTeX-auto-environment symbol))) 1360 1377 LaTeX-auto-end-symbol)) 1361 1378 1362 1379 (add-hook 'TeX-auto-cleanup-hook 'LaTeX-auto-cleanup) 1363 1380 1381 1364 1382 (TeX-auto-add-type "label" "LaTeX") 1365 1383 (TeX-auto-add-type "bibitem" "LaTeX") 1366 1384 (TeX-auto-add-type "environment" "LaTeX") 1367 1385 (TeX-auto-add-type "bibliography" "LaTeX" "bibliographies") 1368 1386 (TeX-auto-add-type "index-entry" "LaTeX" "index-entries") … … 1382 1400 regenerated by the respective menu filter." 1383 1401 (apply 'LaTeX-add-environments-auto environments) 1384 1402 (setq LaTeX-environment-menu nil) 1385 1403 (setq LaTeX-environment-modify-menu nil)) 1386 1404 1405 ;;; Biber support 1406 ;;; Need a variable to say if we're using biber - certain things need consitionalising on this 1407 1408 (defvar LaTeX-using-Biber nil "Used to track whether we detected Biber in use") 1409 1387 1410 ;;; BibTeX 1388 1411 1389 1412 ;;;###autoload 1390 1413 (defun BibTeX-auto-store () 1391 1414 "This function should be called from `bibtex-mode-hook'. … … 1775 1798 (append (mapcar 'list (TeX-search-files-by-type 1776 1799 'bstinputs 'local t t)) 1777 1800 BibTeX-global-style-files)) 1778 1801 optional)) 1779 1802 1780 (defvar BibTeX- global-files nil1781 "Association list of BibTeX files.1782 1783 Initialized once at the first time you prompt for an BibTeX file.1803 (defvar BibTeX-Biber-global-files nil 1804 "Association list of BibTeX/Biber files. 1805 1806 Initialized once at the first time you prompt for an BibTeX/Biber file. 1784 1807 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") 1785 1808 1786 1809 (defun TeX-arg-bibliography (optional &optional prompt) 1787 "Prompt for a BibTeX database file.1810 "Prompt for a BibTeX/Biber database file. 1788 1811 If OPTIONAL is non-nil, insert the resulting value as an optional 1789 1812 argument, otherwise as a mandatory one. Use PROMPT as the prompt 1790 1813 string." 1791 (message "Searching for BibTeX files...") 1792 (or BibTeX-global-files 1793 (setq BibTeX-global-files 1794 (mapcar 'list (TeX-search-files-by-type 'bibinputs 'global t t)))) 1814 (message "Searching for BibTeX/Biber files...") 1815 (or BibTeX-Biber-global-files 1816 (setq BibTeX-Biber-global-files 1817 (mapcar 'list (TeX-search-files nil BibTeX-Biber-file-extensions t t)))) 1818 1795 1819 (let ((styles (multi-prompt 1796 1820 "," t 1797 (TeX-argument-prompt optional prompt "BibTeX files") 1798 (append (mapcar 'list (TeX-search-files-by-type 1799 'bibinputs 'local t t)) 1800 BibTeX-global-files)))) 1821 (TeX-argument-prompt optional prompt "BibTeX/Biber files") 1822 (append (mapcar 'list 1823 (TeX-search-files '("./") 1824 BibTeX-Biber-file-extensions 1825 t t)) 1826 BibTeX-Biber-global-files)))) 1801 1827 (apply 'LaTeX-add-bibliographies styles) 1802 1828 (TeX-argument-insert (mapconcat 'identity styles ",") optional))) 1803 1829 1804 1830 (defun TeX-arg-corner (optional &optional prompt) 1805 1831 "Prompt for a LaTeX side or corner position with completion. … … 5258 5284 (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) ()) 5259 5285 TeX-arg-cite) 5260 5286 '("nocite" TeX-arg-cite) 5261 5287 '("bibliographystyle" TeX-arg-bibstyle) 5262 5288 '("bibliography" TeX-arg-bibliography) 5289 '("addbibresource" TeX-arg-bibliography) 5263 5290 '("footnote" 5264 5291 (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) 5265 5292 t) 5266 5293 '("footnotetext" 5267 5294 (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) -
tex-buf.el
diff --git a/tex-buf.el b/tex-buf.el
a b 74 74 ;; THEN ``the'' process is the region process 75 75 ;; ELSE ``the'' process is the master file (of the current buffer) process 76 76 77 77 (defun TeX-save-document (name) 78 78 "Save all files belonging to the current document. 79 Return non-nil if document need to be re-TeX'ed."79 Return non-nil if document needs to be re-TeX'ed." 80 80 (interactive (list (TeX-master-file))) 81 81 (if (string-equal name "") 82 82 (setq name (TeX-master-file))) 83 83 84 84 (TeX-check-files (concat name "." (TeX-output-extension)) … … 364 364 (setq command 365 365 (replace-match string t t command))))) 366 366 command) 367 367 368 368 (defun TeX-check-files (derived originals extensions) 369 "Check thatDERIVED is newer than any of the ORIGINALS.369 "Check if DERIVED is newer than any of the ORIGINALS. 370 370 Try each original with each member of EXTENSIONS, in all directories 371 in `TeX-check-path'." 372 (let ((found nil) 373 (regexp (concat "\\`\\(" 374 (mapconcat (lambda (dir) 375 (regexp-quote 376 (expand-file-name 377 (file-name-as-directory dir)))) 378 TeX-check-path "\\|") 379 "\\).*\\(" 380 (mapconcat 'regexp-quote originals "\\|") 381 "\\)\\.\\(" 382 (mapconcat 'regexp-quote extensions "\\|") 383 "\\)\\'")) 384 (buffers (buffer-list))) 371 in `TeX-check-path'. Returns true if any of the ORIGINALS with any of the 372 EXTENSIONS are newer than DERIVED. Will prompt to save the buffer of any 373 ORIGINALS which are modified but not saved yet." 374 (let ((existingoriginals nil) 375 (found nil) 376 (buffers (buffer-list))) 377 (dolist (path (map 'list (lambda (dir) 378 (expand-file-name 379 (file-name-as-directory dir))) 380 TeX-check-path)) 381 (dolist (orig originals) 382 (dolist (ext extensions) 383 (let ((filepath (concat path orig "." ext))) 384 (if (file-exists-p filepath) 385 (setq existingoriginals (cons filepath existingoriginals))))))) 385 386 (while buffers 386 387 (let* ((buffer (car buffers)) 387 (name (buffer-file-name buffer))) 388 (setq buffers (cdr buffers)) 389 (if (and name (string-match regexp name)) 390 (progn 391 (and (buffer-modified-p buffer) 392 (or (not TeX-save-query) 393 (y-or-n-p (concat "Save file " 394 (buffer-file-name buffer) 395 "? "))) 396 (save-excursion (set-buffer buffer) (save-buffer))) 397 (if (file-newer-than-file-p name derived) 398 (setq found t)))))) 399 found)) 388 (name (buffer-file-name buffer))) 389 (setq buffers (cdr buffers)) 390 (if (and name (member name existingoriginals)) 391 (progn 392 (and (buffer-modified-p buffer) 393 (or (not TeX-save-query) 394 (y-or-n-p (concat "Save file " 395 (buffer-file-name buffer) 396 "? "))) 397 (save-excursion (set-buffer buffer) (save-buffer))))))) 398 (dolist (eo existingoriginals) 399 (if (file-newer-than-file-p eo derived) 400 (setq found t))) 401 found 402 )) 400 403 401 404 (defcustom TeX-save-query t 402 405 "*If non-nil, ask user for permission to save files before starting TeX." 403 406 :group 'TeX-command 404 407 :type 'boolean) 405 408 406 409 (defvar TeX-command-history nil) 407 410 411 ;; Something to remember - if you are testing on a document with no content at all, 412 ;; perhaps one with just \nocite{*} in it for testing Biber runs, no PDF file is created 413 ;; by latex and so the first cond clause will match because (file-newer-than-p) returns 414 ;; t when the second argument does not exist ... this has caused hours of pointless investigations 415 ;; before ... 408 416 (defun TeX-command-query (name) 409 417 "Query the user for what TeX command to use." 410 418 (let* ((default (cond ((if (string-equal name TeX-region) 411 419 (TeX-check-files (concat name "." (TeX-output-extension)) 412 420 (list name) 413 421 TeX-file-extensions) 414 422 (TeX-save-document (TeX-master-file))) 415 423 TeX-command-default) 416 424 ((and (memq major-mode '(doctex-mode latex-mode)) 425 ;; Want to know if and bib file is newer than .bbl 426 ;; We don't care whether the bib files are open in emacs 417 427 (TeX-check-files (concat name ".bbl") 418 428 (mapcar 'car 419 429 (LaTeX-bibliography-list)) 420 BibTeX- file-extensions))430 BibTeX-Biber-file-extensions)) 421 431 ;; We should check for bst files here as well. 422 TeX-command-BibTeX)432 (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX)) 423 433 ((TeX-process-get-variable name 424 434 'TeX-command-next 425 435 TeX-command-Show)) 426 436 (TeX-command-Show))) 427 437 (completion-ignore-case t) … … 671 681 (setq TeX-sentinel-function 'TeX-BibTeX-sentinel) 672 682 (if TeX-process-asynchronous 673 683 process 674 684 (TeX-synchronous-sentinel name file process)))) 675 685 686 (defun TeX-run-Biber (name command file) 687 "Create a process for NAME using COMMAND to format FILE with Biber." 688 (let ((process (TeX-run-command name command file))) 689 (setq TeX-sentinel-function 'TeX-Biber-sentinel) 690 (if TeX-process-asynchronous 691 process 692 (TeX-synchronous-sentinel name file process)))) 693 676 694 (defun TeX-run-compile (name command file) 677 695 "Ignore first and third argument, start compile with second argument." 678 696 (compile command)) 679 697 680 698 (defun TeX-run-shell (name command file) … … 938 956 (defun TeX-LaTeX-sentinel (process name) 939 957 "Cleanup TeX output buffer after running LaTeX." 940 958 (cond ((TeX-TeX-sentinel-check process name)) 941 959 ((and (save-excursion 942 960 (re-search-forward 961 "^Package biblatex Warning: Please (re)run Biber on the file" nil t)) 962 (with-current-buffer TeX-command-buffer 963 (and (LaTeX-bibliography-list) 964 (TeX-check-files (TeX-master-file "bbl") 965 (TeX-style-list) 966 (append TeX-file-extensions 967 BibTeX-Biber-file-extensions))))) 968 (message "%s%s" "You should run Biber to get citations right, " 969 (TeX-current-pages)) 970 (setq TeX-command-next (with-current-buffer TeX-command-buffer 971 TeX-command-Biber))) 972 ((and (save-excursion 973 (re-search-forward 943 974 "^\\(?:LaTeX\\|Package natbib\\) Warning: Citation" nil t)) 944 975 (with-current-buffer TeX-command-buffer 945 976 (and (LaTeX-bibliography-list) 946 977 (TeX-check-files (TeX-master-file "bbl") 947 978 (TeX-style-list) 948 979 (append TeX-file-extensions 949 BibTeX- file-extensions)))))980 BibTeX-Biber-file-extensions))))) 950 981 (message "%s%s" "You should run BibTeX to get citations right, " 951 982 (TeX-current-pages)) 952 983 (setq TeX-command-next (with-current-buffer TeX-command-buffer 953 984 TeX-command-BibTeX))) 985 ((re-search-forward "^(biblatex)\\W+Page breaks have changed" nil t) 986 (message "%s%s" "You should run LaTeX again - page breaks have changed, " 987 (TeX-current-pages)) 988 (setq TeX-command-next TeX-command-default)) 954 989 ((re-search-forward "^\\(?:LaTeX Warning: Label(s)\\|\ 955 990 Package natbib Warning: Citation(s)\\)" nil t) 956 991 (message "%s%s" "You should run LaTeX again to get references right, " 957 992 (TeX-current-pages)) 958 993 (setq TeX-command-next TeX-command-default)) … … 1006 1041 (match-string 1) (match-string 2) 1007 1042 (substitute-command-keys 1008 1043 "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) 1009 1044 (t 1010 1045 (message (concat "BibTeX finished successfully. " 1011 "Run LaTeX again to get citations right.")))) 1012 (setq TeX-command-next TeX-command-default)) 1046 "Run LaTeX again to get citations right.")) 1047 (setq TeX-command-next TeX-command-default)))) 1048 1049 (defun TeX-Biber-sentinel (process name) 1050 "Cleanup TeX output buffer after running Biber." 1051 (goto-char (point-max)) 1052 (cond 1053 ((re-search-backward (concat 1054 "^INFO - \\(WARNINGS\\|ERRORS\\): \\([0-9]+\\)") nil t) 1055 (message (concat "Biber finished with %s %s. " 1056 "Type `%s' to display output.") 1057 (match-string 2) (downcase (match-string 1)) 1058 (substitute-command-keys 1059 "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")) 1060 (setq TeX-command-next TeX-command-default)) 1061 ((re-search-backward (concat 1062 "^FATAL") nil t) 1063 (message (concat "Biber had a fatal error and did not finish! " 1064 "Type `%s' to display output.") 1065 (substitute-command-keys 1066 "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")) 1067 (setq TeX-command-next TeX-command-Biber)) 1068 (t 1069 (message (concat "Biber finished successfully. " 1070 "Run LaTeX again to get citations right.")) 1071 (setq TeX-command-next TeX-command-default)))) 1013 1072 1014 1073 ;;; Process Control 1015 1074 1016 1075 1017 1076 ;; This variable is chared with `compile.el'. -
tex.el
diff --git a/tex.el b/tex.el
a b 133 133 TeX-run-TeX nil (context-mode) :help "Run ConTeXt once") 134 134 ("ConTeXt Full" "texexec %(execopts)%t" 135 135 TeX-run-TeX nil 136 136 (context-mode) :help "Run ConTeXt until completion") 137 137 ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") 138 ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber") 138 139 ,(if (or window-system (getenv "DISPLAY")) 139 140 '("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") 140 141 '("View" "dvi2tty -q -w 132 %s" TeX-run-command t t 141 142 :help "Run Text viewer")) 142 143 ("Print" "%p" TeX-run-command t t :help "Print the file") … … 177 178 178 179 TeX-run-interactive: Run TeX or LaTeX interactively. 179 180 180 181 TeX-run-BibTeX: For BibTeX output. 181 182 183 TeX-run-Biber: For Biber output. 184 182 185 TeX-run-compile: Use `compile' to run the process. 183 186 184 187 TeX-run-shell: Use `shell-command' to run the process. 185 188 186 189 TeX-run-discard: Start the process in the background, discarding its … … 225 228 (function-item TeX-run-command) 226 229 (function-item TeX-run-format) 227 230 (function-item TeX-run-TeX) 228 231 (function-item TeX-run-interactive) 229 232 (function-item TeX-run-BibTeX) 233 (function-item TeX-run-Biber) 230 234 (function-item TeX-run-compile) 231 235 (function-item TeX-run-shell) 232 236 (function-item TeX-run-discard) 233 237 (function-item TeX-run-background) 234 238 (function-item TeX-run-silent) … … 1719 1723 "*The name of the BibTeX entry in `TeX-command-list'." 1720 1724 :group 'TeX-command-name 1721 1725 :type 'string) 1722 1726 (make-variable-buffer-local 'TeX-command-BibTeX) 1723 1727 1728 (defcustom TeX-command-Biber "Biber" 1729 "*The name of the Biber entry in `TeX-command-list'." 1730 :group 'TeX-command-name 1731 :type 'string) 1732 (make-variable-buffer-local 'TeX-command-Biber) 1733 1724 1734 (defcustom TeX-command-Show "View" 1725 1735 "*The default command to show (view or print) a TeX file. 1726 1736 Must be the car of an entry in `TeX-command-list'." 1727 1737 :group 'TeX-command-name 1728 1738 :type 'string) … … 3231 3241 tex 3232 3242 (concat (file-name-as-directory auto) 3233 3243 (TeX-strip-extension tex TeX-all-extensions t) 3234 3244 ".el")))) 3235 3245 ((TeX-match-extension tex (append TeX-file-extensions 3236 BibTeX- file-extensions))3246 BibTeX-Biber-file-extensions)) 3237 3247 (save-excursion 3238 3248 (set-buffer (let (enable-local-eval) 3239 3249 (find-file-noselect tex))) 3240 3250 (message "Parsing %s..." tex) 3241 3251 (TeX-auto-store (concat (file-name-as-directory auto) … … 3251 3261 "Create global auto directory for global TeX macro definitions." 3252 3262 (interactive) 3253 3263 (unless (file-directory-p TeX-auto-global) 3254 3264 (make-directory TeX-auto-global)) 3255 3265 (let ((TeX-file-extensions '("cls" "sty")) 3256 (BibTeX- file-extensions nil))3266 (BibTeX-Biber-file-extensions nil)) 3257 3267 (mapc (lambda (macro) (TeX-auto-generate macro TeX-auto-global)) 3258 3268 TeX-macro-global)) 3259 3269 (byte-recompile-directory TeX-auto-global 0)) 3260 3270 3261 3271 (defun TeX-auto-store (file) … … 3566 3576 a string as element. Its value is obtained from `TeX-command-output-list'. 3567 3577 Access to the value should be through the function `TeX-output-extension'.") 3568 3578 3569 3579 (make-variable-buffer-local 'TeX-output-extension) 3570 3580 3571 (defcustom BibTeX- file-extensions '("bib")3572 "Valid file extensions for BibTeX files."3581 (defcustom BibTeX-Biber-file-extensions '("bib" "ris" "xml") 3582 "Valid file extensions for BibTeX/Biber files." 3573 3583 :group 'TeX-file-extension 3574 3584 :type '(repeat (string :format "%v"))) 3575 3585 3576 3586 (defcustom BibTeX-style-extensions '("bst") 3577 3587 "Valid file extensions for BibTeX styles." … … 3742 3752 ;; and the TeX-macro-* variables are just too broad for this. 3743 3753 (defvar TeX-search-files-type-alist 3744 3754 '((texinputs "${TEXINPUTS}" ("tex/") TeX-file-extensions) 3745 3755 (docs "${TEXDOCS}" ("doc/") TeX-doc-extensions) 3746 3756 (graphics "${TEXINPUTS}" ("tex/") LaTeX-includegraphics-extensions) 3747 (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX- file-extensions)3757 (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX-Biber-file-extensions) 3748 3758 (bstinputs "${BSTINPUTS}" ("bibtex/bst/") BibTeX-style-extensions)) 3749 3759 "Alist of filetypes with locations and file extensions. 3750 3760 Each element of the alist consists of a symbol expressing the 3751 3761 filetype, a variable which can be expanded on kpathsea-based 3752 3762 systems into the directories where files of the given type … … 5099 5109 ;; FIXME: Shouldn't it be (&optional arg)? -- rs 5100 5110 (interactive "*P") 5101 5111 (if arg 5102 5112 (setq TeX-style-hook-list nil 5103 5113 BibTeX-global-style-files nil 5104 BibTeX- global-files nil5114 BibTeX-Biber-global-files nil 5105 5115 TeX-global-input-files nil)) 5106 5116 (let ((TeX-auto-save t)) 5107 5117 (if (buffer-modified-p) 5108 5118 (save-buffer) 5109 5119 (TeX-auto-write)))