auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3a5ed086d3fc8869af01c


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3a5ed086d3fc8869af01ce940c35dd54cdeb8f40
Date: Thu, 5 Jan 2017 09:18:58 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  3a5ed086d3fc8869af01ce940c35dd54cdeb8f40 (commit)
      from  00df9a526165836430c9b0d8ddfb261550f30a88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3a5ed086d3fc8869af01ce940c35dd54cdeb8f40
Author: Arash Esbati <address@hidden>
Date:   Thu Jan 5 10:17:03 2017 +0100

    Support biblatex cite format in all Emacsen
    
    * style/biblatex.el ("biblatex"): Check if biblatex is available
    in `reftex-cite-format-builtin' and use it.  If not, add entries
    for older Emacsen manually.

diff --git a/style/biblatex.el b/style/biblatex.el
index 32d585a..aa5fcc9 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -552,16 +552,35 @@ for citation keys."
     "biblatex"
     "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.
+   ;; Tell RefTeX: If package option `natbib' is given, activate that
+   ;; format, otherwise stick with `biblatex':
    (when (and LaTeX-reftex-cite-format-auto-activate
              (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))))
+       ;; The entry `biblatex' is defined in
+       ;; `reftex-cite-format-builtin' in reftex-vars.el which will be
+       ;; part of Emacs >= 25.3.  So check here if we find an entry,
+       ;; otherwise do it manually for older Emacsen.
+       (if (assoc 'biblatex reftex-cite-format-builtin)
+          (reftex-set-cite-format 'biblatex)
+        (reftex-set-cite-format
+         '((?\C-m . "\\cite[][]{%l}")
+           (?C    . "\\cite*[][]{%l}")
+           (?t    . "\\textcite[][]{%l}")
+           (?T    . "\\textcite*[][]{%l}")
+           (?p    . "\\parencite[][]{%l}")
+           (?P    . "\\parencite*[][]{%l}")
+           (?f    . "\\footcite[][]{%l}")
+           (?s    . "\\smartcite[][]{%l}")
+           (?u    . "\\autocite[][]{%l}")
+           (?U    . "\\autocite*[][]{%l}")
+           (?a    . "\\citeauthor{%l}")
+           (?A    . "\\citeauthor*{%l}")
+           (?y    . "\\citeyear{%l}")
+           (?Y    . "\\citeyear*{%l}")
+           (?n    . "\\nocite{%l}")))))))
  LaTeX-dialect)
 
 (defvar LaTeX-biblatex-package-options-list

-----------------------------------------------------------------------

Summary of changes:
 style/biblatex.el |   29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]