branch: externals/auctex
commit bef487308acb26c775d5e79daaa484662e0e2067
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Set `reftex-set-cite-format' to biblatex or natbib
* style/biblatex.el ("biblatex"): Set `reftex-set-cite-format' to
biblatex or natbib depending on package option.
---
style/biblatex.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/style/biblatex.el b/style/biblatex.el
index 01c51cf..9ec2b02 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -544,7 +544,17 @@ for citation keys."
"NewBibliographyString")
(LaTeX-declare-expert-environments
"biblatex"
- "refsection" "refsegment"))
+ "refsection" "refsegment")
+
+ ;; Tell RefTeX: The entry `biblatex' is defined in
+ ;; `reftex-cite-format-builtin' in reftex-vars.el which will be
+ ;; part of Emacs >= 25.3. It does not issue an error for older
+ ;; Emacsen, but does not work either, i.e. it is ignored.
+ (when (fboundp 'reftex-set-cite-format)
+ (if (or (LaTeX-provided-package-options-member "biblatex" "natbib")
+ (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
+ (reftex-set-cite-format 'natbib)
+ (reftex-set-cite-format 'biblatex))))
LaTeX-dialect)
(defvar LaTeX-biblatex-package-options-list