unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Rüdiger Sonderfeld" <ruediger@c-plusplus.de>
To: auctex-devel@gnu.org
Cc: emacs-devel@gnu.org
Subject: [PATCH 1/3] RefTeX: Basic Biblatex support.
Date: Wed, 15 May 2013 20:10:06 +0200	[thread overview]
Message-ID: <1614996.YrF0ft91WL@descartes> (raw)

Add support for Biblatex' \addbibresource[<options>]{<resouce>}.
There is probably more to do for full Biblatex support, such as
addglobalbib/addsectionbib support.

http://www.ctan.org/pkg/biblatex

* lisp/textmodes/reftex-parse.el (reftex-locate-bibliography-files):
  Accept options for bibliography commands.
* lisp/textmodes/reftex-vars.el (reftex-bibliography-commands): Add
  addbibresource.  Basic Biblatex support.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
---
 lisp/textmodes/reftex-parse.el | 4 ++--
 lisp/textmodes/reftex-vars.el  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index 6bfc70c..8d1b3f7 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -359,9 +359,9 @@ of master file."
 ;           "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\("
             "\\(^\\)[^%\n\r]*\\\\\\("
             (mapconcat 'identity reftex-bibliography-commands "\\|")
-            "\\){[ \t]*\\([^}]+\\)") nil t)
+            "\\)\\(\\[.+?\\]\\)?{[ \t]*\\([^}]+\\)") nil t)
           (setq files
-                (split-string (reftex-match-string 3)
+                (split-string (reftex-match-string 4)
                               "[ \t\n\r]*,[ \t\n\r]*")))))
   (when files
     (setq files
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 47bec5e..3792ab4 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -1112,7 +1112,7 @@ buffer."
   :group 'reftex)
 
 (defcustom reftex-bibliography-commands
-  '("bibliography" "nobibliography" "setupbibtex\\[.*?database=")
+  '("bibliography" "nobibliography" "setupbibtex\\[.*?database=" "addbibresource")
   "LaTeX commands which specify the BibTeX databases to use with the document."
   :group 'reftex-citation-support
   :type '(repeat string))
-- 
1.8.2.3





             reply	other threads:[~2013-05-15 18:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 18:10 Rüdiger Sonderfeld [this message]
2013-05-23 15:23 ` [PATCH 1/3] RefTeX: Basic Biblatex support Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1614996.YrF0ft91WL@descartes \
    --to=ruediger@c-plusplus.de \
    --cc=auctex-devel@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).