Ticket #34846: biber.patch

File biber.patch, 22.1 KB (added by seanfarley (Sean Farley), 12 years ago)

biber variant patch

  • 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  
    289289      ("addtolength" "|{\\{") ("addtocounter" "{|{\\")
    290290      ("stepcounter" "{") ("refstepcounter" "{")
    291291      ("arabic" "{") ("roman" "{") ("Roman" "{") ("alph" "{") ("Alph" "{")
    292292      ("fnsymbol" "{"))
    293293     '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)
    294322    ("reference"
    295      (("nocite" "{") ("cite" "[{") ("label" "{") ("pageref" "{")
     323     (("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{")
    296324      ("vref" "{") ("eqref" "{") ("ref" "{") ("include" "{")
    297325      ("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{")
    298326      ("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{"))
    299327     'font-lock-constant-face 2 command)
    300328    ("function"
     
    793821
    794822(defun font-latex-add-keywords (keywords class)
    795823  "Add KEYWORDS to CLASS.
    796824KEYWORDS is a list of keywords or keywords with syntax specs.
    797825CLASS corresponds to a keyword class and can be one of the
    798 symbols 'warning, 'variable, 'reference, 'function, sectioning-0,
     826symbols 'warning, 'variable, 'reference, 'biblatex, 'function, sectioning-0,
    799827'sectioning-1, 'sectioning-2, 'sectioning-3, 'sectioning-4,
    800828'sectioning-5, 'slide-title, 'textual, 'bold-command,
    801829'italic-command, 'math-command, 'type-command, 'bold-declaration,
    802830'italic-declaration or 'type-declaration.
    803831
  • latex.el

    diff --git a/latex.el b/latex.el
    a b  
    12101210       ("\\\\include{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}"
    12111211        1 TeX-auto-file)
    12121212       (, (concat "\\\\bibitem{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}") 1 LaTeX-auto-bibitem)
    12131213       (, (concat "\\\\bibitem\\[[^][\n\r]+\\]{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}")
    12141214          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)))
    12161222   LaTeX-auto-class-regexp-list
    12171223   LaTeX-auto-label-regexp-list
    12181224   LaTeX-auto-index-regexp-list
    12191225   LaTeX-auto-minimal-regexp-list)
    12201226  "List of regular expression matching common LaTeX macro definitions.")
    12211227
     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
    12221239(defun LaTeX-auto-prepare ()
    12231240  "Prepare for LaTeX parsing."
    12241241  (setq LaTeX-auto-arguments nil
    12251242        LaTeX-auto-optional nil
    12261243        LaTeX-auto-env-args nil
     
    12461263    opts))
    12471264
    12481265(defun LaTeX-auto-cleanup ()
    12491266  "Cleanup after LaTeX parsing."
    12501267
    1251   ;; Cleanup BibTeX files
     1268  ;; Cleanup BibTeX/Biber files
    12521269  (setq LaTeX-auto-bibliography
    12531270        (apply 'append (mapcar (lambda (arg)
    12541271                                 (TeX-split-string "," arg))
    12551272                               LaTeX-auto-bibliography)))
    12561273
     
    13591376            (add-to-list 'LaTeX-auto-environment symbol)))
    13601377        LaTeX-auto-end-symbol))
    13611378
    13621379(add-hook 'TeX-auto-cleanup-hook 'LaTeX-auto-cleanup)
    13631380
     1381
    13641382(TeX-auto-add-type "label" "LaTeX")
    13651383(TeX-auto-add-type "bibitem" "LaTeX")
    13661384(TeX-auto-add-type "environment" "LaTeX")
    13671385(TeX-auto-add-type "bibliography" "LaTeX" "bibliographies")
    13681386(TeX-auto-add-type "index-entry" "LaTeX" "index-entries")
     
    13821400regenerated by the respective menu filter."
    13831401  (apply 'LaTeX-add-environments-auto environments)
    13841402  (setq LaTeX-environment-menu nil)
    13851403  (setq LaTeX-environment-modify-menu nil))
    13861404
     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
    13871410;;; BibTeX
    13881411
    13891412;;;###autoload
    13901413(defun BibTeX-auto-store ()
    13911414  "This function should be called from `bibtex-mode-hook'.
     
    17751798                    (append (mapcar 'list (TeX-search-files-by-type
    17761799                                           'bstinputs 'local t t))
    17771800                            BibTeX-global-style-files))
    17781801   optional))
    17791802
    1780 (defvar BibTeX-global-files nil
    1781   "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
     1806Initialized once at the first time you prompt for an BibTeX/Biber file.
    17841807May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
    17851808
    17861809(defun TeX-arg-bibliography (optional &optional prompt)
    1787   "Prompt for a BibTeX database file.
     1810  "Prompt for a BibTeX/Biber database file.
    17881811If OPTIONAL is non-nil, insert the resulting value as an optional
    17891812argument, otherwise as a mandatory one.  Use PROMPT as the prompt
    17901813string."
    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
    17951819  (let ((styles (multi-prompt
    17961820                 "," 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))))
    18011827    (apply 'LaTeX-add-bibliographies styles)
    18021828    (TeX-argument-insert (mapconcat 'identity styles ",") optional)))
    18031829
    18041830(defun TeX-arg-corner (optional &optional prompt)
    18051831  "Prompt for a LaTeX side or corner position with completion.
     
    52585284     (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) ())
    52595285     TeX-arg-cite)
    52605286   '("nocite" TeX-arg-cite)
    52615287   '("bibliographystyle" TeX-arg-bibstyle)
    52625288   '("bibliography" TeX-arg-bibliography)
     5289   '("addbibresource" TeX-arg-bibliography)
    52635290   '("footnote"
    52645291     (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
    52655292     t)
    52665293   '("footnotetext"
    52675294     (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  
    7474;; THEN ``the'' process is the region process
    7575;; ELSE ``the'' process is the master file (of the current buffer) process
    7676
    7777(defun TeX-save-document (name)
    7878  "Save all files belonging to the current document.
    79 Return non-nil if document need to be re-TeX'ed."
     79Return non-nil if document needs to be re-TeX'ed."
    8080  (interactive (list (TeX-master-file)))
    8181  (if (string-equal name "")
    8282      (setq name (TeX-master-file)))
    8383
    8484  (TeX-check-files (concat name "." (TeX-output-extension))
     
    364364          (setq command
    365365                (replace-match string t t command)))))
    366366  command)
    367367
    368368(defun TeX-check-files (derived originals extensions)
    369   "Check that DERIVED is newer than any of the ORIGINALS.
     369  "Check if DERIVED is newer than any of the ORIGINALS.
    370370Try 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)))
     371in `TeX-check-path'. Returns true if any of the ORIGINALS with any of the
     372EXTENSIONS are newer than DERIVED. Will prompt to save the buffer of any
     373ORIGINALS 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)))))))
    385386    (while buffers
    386387      (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    ))
    400403
    401404(defcustom TeX-save-query t
    402405  "*If non-nil, ask user for permission to save files before starting TeX."
    403406  :group 'TeX-command
    404407  :type 'boolean)
    405408
    406409(defvar TeX-command-history nil)
    407410
     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 ...
    408416(defun TeX-command-query (name)
    409417  "Query the user for what TeX command to use."
    410418  (let* ((default (cond ((if (string-equal name TeX-region)
    411419                             (TeX-check-files (concat name "." (TeX-output-extension))
    412420                                              (list name)
    413421                                              TeX-file-extensions)
    414422                           (TeX-save-document (TeX-master-file)))
    415423                         TeX-command-default)
    416424                        ((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
    417427                              (TeX-check-files (concat name ".bbl")
    418428                                               (mapcar 'car
    419429                                                       (LaTeX-bibliography-list))
    420                                                BibTeX-file-extensions))
     430                                               BibTeX-Biber-file-extensions))
    421431                         ;; We should check for bst files here as well.
    422                          TeX-command-BibTeX)
     432                         (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX))
    423433                        ((TeX-process-get-variable name
    424434                                                   'TeX-command-next
    425435                                                   TeX-command-Show))
    426436                        (TeX-command-Show)))
    427437         (completion-ignore-case t)
     
    671681    (setq TeX-sentinel-function 'TeX-BibTeX-sentinel)
    672682    (if TeX-process-asynchronous
    673683        process
    674684      (TeX-synchronous-sentinel name file process))))
    675685
     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
    676694(defun TeX-run-compile (name command file)
    677695  "Ignore first and third argument, start compile with second argument."
    678696  (compile command))
    679697
    680698(defun TeX-run-shell (name command file)
     
    938956(defun TeX-LaTeX-sentinel (process name)
    939957  "Cleanup TeX output buffer after running LaTeX."
    940958  (cond ((TeX-TeX-sentinel-check process name))
    941959        ((and (save-excursion
    942960                (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
    943974                 "^\\(?:LaTeX\\|Package natbib\\) Warning: Citation" nil t))
    944975              (with-current-buffer TeX-command-buffer
    945976                (and (LaTeX-bibliography-list)
    946977                     (TeX-check-files (TeX-master-file "bbl")
    947978                                      (TeX-style-list)
    948979                                      (append TeX-file-extensions
    949                                               BibTeX-file-extensions)))))
     980                                              BibTeX-Biber-file-extensions)))))
    950981         (message "%s%s" "You should run BibTeX to get citations right, "
    951982                  (TeX-current-pages))
    952983         (setq TeX-command-next (with-current-buffer TeX-command-buffer
    953984                                  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))
    954989        ((re-search-forward "^\\(?:LaTeX Warning: Label(s)\\|\
    955990Package natbib Warning: Citation(s)\\)" nil t)
    956991         (message "%s%s" "You should run LaTeX again to get references right, "
    957992                  (TeX-current-pages))
    958993         (setq TeX-command-next TeX-command-default))
     
    10061041             (match-string 1) (match-string 2)
    10071042             (substitute-command-keys
    10081043              "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
    10091044   (t
    10101045    (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))))
    10131072
    10141073;;; Process Control
    10151074
    10161075
    10171076;; This variable is chared with `compile.el'.
  • tex.el

    diff --git a/tex.el b/tex.el
    a b  
    133133     TeX-run-TeX nil (context-mode) :help "Run ConTeXt once")
    134134    ("ConTeXt Full" "texexec %(execopts)%t"
    135135     TeX-run-TeX nil
    136136     (context-mode) :help "Run ConTeXt until completion")
    137137    ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX")
     138    ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
    138139    ,(if (or window-system (getenv "DISPLAY"))
    139140        '("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer")
    140141       '("View" "dvi2tty -q -w 132 %s" TeX-run-command t t
    141142         :help "Run Text viewer"))
    142143    ("Print" "%p" TeX-run-command t t :help "Print the file")
     
    177178
    178179TeX-run-interactive: Run TeX or LaTeX interactively.
    179180
    180181TeX-run-BibTeX: For BibTeX output.
    181182
     183TeX-run-Biber: For Biber output.
     184
    182185TeX-run-compile: Use `compile' to run the process.
    183186
    184187TeX-run-shell: Use `shell-command' to run the process.
    185188
    186189TeX-run-discard: Start the process in the background, discarding its
     
    225228                                (function-item TeX-run-command)
    226229                                (function-item TeX-run-format)
    227230                                (function-item TeX-run-TeX)
    228231                                (function-item TeX-run-interactive)
    229232                                (function-item TeX-run-BibTeX)
     233                                (function-item TeX-run-Biber)
    230234                                (function-item TeX-run-compile)
    231235                                (function-item TeX-run-shell)
    232236                                (function-item TeX-run-discard)
    233237                                (function-item TeX-run-background)
    234238                                (function-item TeX-run-silent)
     
    17191723  "*The name of the BibTeX entry in `TeX-command-list'."
    17201724  :group 'TeX-command-name
    17211725  :type 'string)
    17221726  (make-variable-buffer-local 'TeX-command-BibTeX)
    17231727
     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
    17241734(defcustom TeX-command-Show "View"
    17251735  "*The default command to show (view or print) a TeX file.
    17261736Must be the car of an entry in `TeX-command-list'."
    17271737  :group 'TeX-command-name
    17281738  :type 'string)
     
    32313241               tex
    32323242               (concat (file-name-as-directory auto)
    32333243                       (TeX-strip-extension tex TeX-all-extensions t)
    32343244                       ".el"))))
    32353245        ((TeX-match-extension tex (append TeX-file-extensions
    3236                                           BibTeX-file-extensions))
     3246                                          BibTeX-Biber-file-extensions))
    32373247         (save-excursion
    32383248           (set-buffer (let (enable-local-eval)
    32393249                         (find-file-noselect tex)))
    32403250           (message "Parsing %s..." tex)
    32413251           (TeX-auto-store (concat (file-name-as-directory auto)
     
    32513261  "Create global auto directory for global TeX macro definitions."
    32523262  (interactive)
    32533263  (unless (file-directory-p TeX-auto-global)
    32543264    (make-directory TeX-auto-global))
    32553265  (let ((TeX-file-extensions '("cls" "sty"))
    3256         (BibTeX-file-extensions nil))
     3266        (BibTeX-Biber-file-extensions nil))
    32573267    (mapc (lambda (macro) (TeX-auto-generate macro TeX-auto-global))
    32583268          TeX-macro-global))
    32593269  (byte-recompile-directory TeX-auto-global 0))
    32603270
    32613271(defun TeX-auto-store (file)
     
    35663576a string as element.  Its value is obtained from `TeX-command-output-list'.
    35673577Access to the value should be through the function `TeX-output-extension'.")
    35683578
    35693579  (make-variable-buffer-local 'TeX-output-extension)
    35703580
    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."
    35733583  :group 'TeX-file-extension
    35743584  :type '(repeat (string :format "%v")))
    35753585
    35763586(defcustom BibTeX-style-extensions '("bst")
    35773587  "Valid file extensions for BibTeX styles."
     
    37423752;; and the TeX-macro-* variables are just too broad for this.
    37433753(defvar TeX-search-files-type-alist
    37443754  '((texinputs "${TEXINPUTS}" ("tex/") TeX-file-extensions)
    37453755    (docs "${TEXDOCS}" ("doc/") TeX-doc-extensions)
    37463756    (graphics "${TEXINPUTS}" ("tex/") LaTeX-includegraphics-extensions)
    3747     (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX-file-extensions)
     3757    (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX-Biber-file-extensions)
    37483758    (bstinputs "${BSTINPUTS}" ("bibtex/bst/") BibTeX-style-extensions))
    37493759  "Alist of filetypes with locations and file extensions.
    37503760Each element of the alist consists of a symbol expressing the
    37513761filetype, a variable which can be expanded on kpathsea-based
    37523762systems into the directories where files of the given type
     
    50995109  ;; FIXME: Shouldn't it be (&optional arg)?  -- rs
    51005110  (interactive "*P")
    51015111  (if arg
    51025112      (setq TeX-style-hook-list nil
    51035113            BibTeX-global-style-files nil
    5104             BibTeX-global-files nil
     5114            BibTeX-Biber-global-files nil
    51055115            TeX-global-input-files nil))
    51065116  (let ((TeX-auto-save t))
    51075117    (if (buffer-modified-p)
    51085118        (save-buffer)
    51095119      (TeX-auto-write)))