[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 238/299: Use LaTeX-biblatex-use-Biber to manually select bibliogr
From: |
Stefan Monnier |
Subject: |
[elpa] 238/299: Use LaTeX-biblatex-use-Biber to manually select bibliography processor. |
Date: |
Sun, 02 Nov 2014 03:11:42 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 25fe7295d21de4231d5e7d5a890b4529d06f1eda
Author: Mosè Giordano <address@hidden>
Date: Fri Apr 4 21:46:07 2014 +0200
Use LaTeX-biblatex-use-Biber to manually select bibliography processor.
* tex-style.el: Update coyright years.
(LaTeX-biblatex-use-Biber): New variable. Mark as
safe-local-variable.
* latex.el (TeX-latex-mode): Add setting of `LaTeX-using-Biber' to
`TeX-update-style-hook'.
* style/biblatex.el ("biblatex"): Use `LaTeX-biblatex-use-Biber'
value to set `LaTeX-using-Biber' when it is set locally.
* tex-bar.el: Update copyright years.
(LaTeX-install-toolbar): Append toolbar refresh to
`TeX-update-style-hook' instead of prepending it.
* doc/auctex.texi: Update copyright years.
(Selecting a Command): Document `LaTeX-biblatex-use-Biber'.
* doc/changes.texi: Mention `LaTeX-biblatex-use-Biber' change.
---
ChangeLog | 21 +++++++++++++++++++++
doc/auctex.texi | 19 +++++++++++++------
doc/changes.texi | 3 ++-
latex.el | 8 ++++++++
style/biblatex.el | 15 +++++++++++----
tex-bar.el | 9 +++++----
tex-style.el | 13 ++++++++++++-
7 files changed, 72 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e024f95..e840622 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2014-04-04 Mos� Giordano <address@hidden>
+
+ * tex-style.el: Update coyright years.
+ (LaTeX-biblatex-use-Biber): New variable. Mark as
+ safe-local-variable.
+
+ * latex.el (TeX-latex-mode): Add setting of `LaTeX-using-Biber' to
+ `TeX-update-style-hook'.
+
+ * style/biblatex.el ("biblatex"): Use `LaTeX-biblatex-use-Biber'
+ value to set `LaTeX-using-Biber' when it is set locally.
+
+ * tex-bar.el: Update copyright years.
+ (LaTeX-install-toolbar): Append toolbar refresh to
+ `TeX-update-style-hook' instead of prepending it.
+
+ * doc/auctex.texi: Update copyright years.
+ (Selecting a Command): Document `LaTeX-biblatex-use-Biber'.
+
+ * doc/changes.texi: Mention `LaTeX-biblatex-use-Biber' change.
+
2014-04-02 Mos� Giordano <address@hidden>
* style/biblatex.el: Update copyright years and specify last
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 88fc820..c84282a 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -12,7 +12,7 @@ This manual is for @AUCTeX{}
(version @value{VERSION} from @value{UPDATED}),
a sophisticated TeX environment for Emacs.
-Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2013
+Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2014
Free Software Foundation, Inc.
@quotation
@@ -2696,11 +2696,18 @@ The default command to run in this buffer. Must be an
entry in
@cindex Biber
@cindex biblatex
-In case you use biblatex in a document, @AUCTeX{} switches from
address@hidden to Biber for bibliography processing. If you have enabled
-automatic parsing, @AUCTeX{} checks the value of @samp{backend} option
-given to biblatex at load time to decide whether to use address@hidden or
-Biber.
+In case you use biblatex in a document, when automatic parsing is
+enabled @AUCTeX{} checks the value of @samp{backend} option given to
+biblatex at load time to decide whether to use address@hidden or Biber for
+bibliography processing. Should @AUCTeX{} fail to detect the right
+backend, you can use the file local @code{LaTeX-biblatex-use-Biber}
+variable.
address@hidden Variable LaTeX-biblatex-use-Biber
+If this boolean variable is set as file local, it tells to @AUCTeX{}
+whether to use Biber with biblatex. In this case, the autodetection of
+the biblatex backend will be overridden. You may want to set locally
+this variable if automatic parsing is not enabled.
address@hidden defvr
After confirming a command to execute, @AUCTeX{} will try to save any
buffers related to the document, and check if the document needs to be
diff --git a/doc/changes.texi b/doc/changes.texi
index a324dcb..b8eb96a 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -51,7 +51,8 @@ and @code{LaTeX-fontspec-font-list-default}. A new possible
value
@item
@samp{biblatex} support was greatly expanded. If parsing is enabled,
@AUCTeX{} looks at @samp{backend} option to decide whether to use Biber
-or BibTeX. @code{LaTeX-biblatex-use-Biber} option was removed.
+or BibTeX. The @code{LaTeX-biblatex-use-Biber} variable was changed to
+be file local only and is no more customizable.
@item
With some @LaTeX{} classes, the default environment suggested by
diff --git a/latex.el b/latex.el
index 69e8760..4b9188a 100644
--- a/latex.el
+++ b/latex.el
@@ -5535,6 +5535,14 @@ of `LaTeX-mode-hook'."
(featurep 'toolbar)
(and (boundp 'tool-bar-mode) tool-bar-mode))
(LaTeX-maybe-install-toolbar))
+ ;; Set the value of `LaTeX-using-Biber' based on the local value of
+ ;; `LaTeX-biblatex-use-Biber'. This should be run within
+ ;; `TeX-update-style-hook' before toolbarx-refresh, otherwise the
bibliography
+ ;; button could be wrongly set.
+ (add-hook 'TeX-update-style-hook
+ (lambda ()
+ (if (local-variable-p 'LaTeX-biblatex-use-Biber)
+ (setq LaTeX-using-Biber LaTeX-biblatex-use-Biber))) nil t)
(TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
(TeX-set-mode-name)
;; Defeat filladapt
diff --git a/style/biblatex.el b/style/biblatex.el
index 600e149..ff2d7d6 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -220,11 +220,18 @@ for citation keys."
"biblatex"
(lambda ()
;; Biblatex uses as default backend biber, run it unless biblatex `backend'
- ;; option value is one of `bibtex', `bibtex8', `bibtexu'.
+ ;; option value is one of `bibtex', `bibtex8', `bibtexu'. Autodetection of
+ ;; the backend can be overridden by setting `LaTeX-biblatex-use-Biber' as a
+ ;; local variable.
(setq LaTeX-using-Biber
- (not (or (LaTeX-provided-package-options-member "biblatex"
"backend=bibtex")
- (LaTeX-provided-package-options-member "biblatex"
"backend=bibtex8")
- (LaTeX-provided-package-options-member "biblatex"
"backend=bibtexu"))))
+ (if (local-variable-p 'LaTeX-biblatex-use-Biber)
+ LaTeX-biblatex-use-Biber
+ (not (or (LaTeX-provided-package-options-member
+ "biblatex" "backend=bibtex")
+ (LaTeX-provided-package-options-member
+ "biblatex" "backend=bibtex8")
+ (LaTeX-provided-package-options-member
+ "biblatex" "backend=bibtexu")))))
(TeX-run-style-hooks
"etoolbox"
diff --git a/tex-bar.el b/tex-bar.el
index aaa9301..f3cbaf1 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -1,6 +1,6 @@
;;; tex-bar.el --- toolbar icons on AUCTeX in GNU emacs and XEmacs
-;; Copyright (C) 2004-2008, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2008, 2012-2014 Free Software Foundation, Inc.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
@@ -371,9 +371,10 @@ format of the argument MEANING-ALIST in the mentioned
function."
(add-to-list 'toolbarx-image-path
(expand-file-name "images" TeX-data-directory))
(add-hook 'TeX-PDF-mode-hook 'toolbarx-refresh nil t)
- ;; Refresh toolbar after styles update because `LaTeX-using-Biber' value
could
- ;; have been changed.
- (add-hook 'TeX-update-style-hook 'toolbarx-refresh nil t)
+ ;; Refresh the toolbar after styles update because `LaTeX-using-Biber' value
+ ;; could have been changed. Append the refresh to the hook so it is run
after
+ ;; the other styles-related changes.
+ (add-hook 'TeX-update-style-hook 'toolbarx-refresh t t)
(toolbarx-install-toolbar TeX-bar-LaTeX-buttons
(let ((append-list))
(dolist (elt TeX-bar-LaTeX-all-button-alists)
diff --git a/tex-style.el b/tex-style.el
index 9975b3f..b03a004 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -1,6 +1,7 @@
;;; tex-style.el --- Customizable variables for AUCTeX style files
-;; Copyright (C) 2005, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007, 2009, 2012-2014
+;; Free Software Foundation, Inc.
;; Author: Reiner Steib <address@hidden>
;; Keywords: tex, wp, convenience
@@ -213,6 +214,16 @@ It can be a list of themes or a function. If it is the
symbol
:tag "Other"
(string)))))
+;; style/biblatex.el
+
+(defvar LaTeX-biblatex-use-Biber t
+ "Whether to use Biber with biblatex.
+
+This variable is intended to be used as a file local variable to
+override the autodetection of the biblatex backend.")
+(make-variable-buffer-local 'LaTeX-biblatex-use-Biber)
+(put 'LaTeX-biblatex-use-Biber 'safe-local-variable 'TeX-booleanp)
+
;; style/comment.el
(defcustom LaTeX-comment-env-list '("comment")
- [elpa] 233/299: Prevent an infinite loop in TeX-command-expand., (continued)
- [elpa] 233/299: Prevent an infinite loop in TeX-command-expand., Stefan Monnier, 2014/11/01
- [elpa] 227/299: Fix missing quote., Stefan Monnier, 2014/11/01
- [elpa] 235/299: Enable TeX-PDF-mode by default., Stefan Monnier, 2014/11/01
- [elpa] 236/299: Add new style/exercise.el., Stefan Monnier, 2014/11/01
- [elpa] 231/299: Make TeX-completing-read-multiple return nil on empty input., Stefan Monnier, 2014/11/01
- [elpa] 239/299: Silence assignment to free variable warnings., Stefan Monnier, 2014/11/01
- [elpa] 240/299: Fix ChangeLog node for texinfo., Stefan Monnier, 2014/11/01
- [elpa] 242/299: Add another exception to error parsing., Stefan Monnier, 2014/11/01
- [elpa] 241/299: Resolve conflicts, Stefan Monnier, 2014/11/01
- [elpa] 243/299: Fix fontification of optional argument to verbatim environments., Stefan Monnier, 2014/11/01
- [elpa] 238/299: Use LaTeX-biblatex-use-Biber to manually select bibliography processor.,
Stefan Monnier <=
- [elpa] 246/299: Make style/babel.el file non-executable., Stefan Monnier, 2014/11/01
- [elpa] 234/299: Ask for TeX-master if unknown., Stefan Monnier, 2014/11/01
- [elpa] 244/299: Fix typo in listings.el., Stefan Monnier, 2014/11/01
- [elpa] 237/299: Update biblatex support in style file., Stefan Monnier, 2014/11/01
- [elpa] 250/299: Add TeX-previous-error to Command menu., Stefan Monnier, 2014/11/01
- [elpa] 247/299: Convert font-latex-fontify-sectioning to float when used as a number., Stefan Monnier, 2014/11/01
- [elpa] 252/299: Fix possible infinite loop in TeX-parse-all-errors., Stefan Monnier, 2014/11/01
- [elpa] 249/299: Backport from ELPA repository., Stefan Monnier, 2014/11/01
- [elpa] 245/299: Use TeX-esc as completion separator for units in siunitx.el., Stefan Monnier, 2014/11/01
- [elpa] 253/299: Cater for bad boxes in error descriptions., Stefan Monnier, 2014/11/01