;;; refer.el --- look up references in bibliography files
-;; Copyright (C) 1992, 1996, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1996, 2001-2016 Free Software Foundation, Inc.
;; Author: Ashwin Ram <ashwin@cc.gatech.edu>
;; Maintainer: Gernot Heiser <gernot@acm.org>
(defcustom refer-bib-directory nil
"Directory, or list of directories, to search for \\.bib files.
-Can be set to 'bibinputs or 'texinputs, in which case the environment
+Can be set to `bibinputs' or `texinputs', in which case the environment
variable BIBINPUTS or TEXINPUTS, respectively, is used to obtain a
-list of directories. Useful only if `refer-bib-files' is set to 'dir or
+list of directories. Useful only if `refer-bib-files' is set to `dir' or
a list of file names (without directory). A value of nil indicates the
current working directory.
-If `refer-bib-directory' is 'bibinputs or 'texinputs, it is setq'd to
+If `refer-bib-directory' is `bibinputs' or `texinputs', it is setq'd to
the appropriate list of directories when it is first used.
Note that an empty directory is interpreted by BibTeX as indicating
:group 'refer)
(defcustom refer-bib-files 'dir
- "*List of \\.bib files to search for references,
+ "List of \\.bib files to search for references,
or one of the following special values:
nil = prompt for \\.bib file (if visiting a \\.bib file, use it as default)
auto = read \\.bib file names from appropriate command in buffer (see
:group 'refer)
(defcustom refer-cache-bib-files t
- "*Variable determining whether the value of `refer-bib-files' should be cached.
+ "Variable determining whether the value of `refer-bib-files' should be cached.
If t, initialize the value of refer-bib-files the first time it is used. If
nil, re-read the list of \\.bib files depending on the value of `refer-bib-files'
each time it is needed."
:group 'refer)
(defcustom refer-bib-files-regexp "\\\\bibliography"
- "*Regexp matching a bibliography file declaration.
+ "Regexp matching a bibliography file declaration.
The current buffer is expected to contain a line such as
\\bibliography{file1,file2,file3}
which is read to set up `refer-bib-files'. The regexp must specify the command
(sit-for 1)
(setq files (cdr files))))))
(ding)
- (message "Keywords \"%s\" not found in any \.bib file" keywords))
+ (message "Keywords \"%s\" not found in any .bib file" keywords))
(select-window old-window)))
(defun refer-find-entry-in-file (keywords-list file &optional old-pos)
(if (progn
(goto-char (point-min))
(re-search-forward (concat refer-bib-files-regexp
- "\\s-*\{") nil t))
+ "\\s-*{") nil t))
(let ((files (list (buffer-substring
(point)
(progn
- (re-search-forward "[,\}]"
+ (re-search-forward "[,}]"
nil t)
(backward-char 1)
(point))))))
- (while (not (looking-at "\}"))
+ (while (not (looking-at "}"))
(setq files (append files
(list (buffer-substring
(progn (forward-char 1)
(point))
(progn (re-search-forward
- "[,\}]" nil t)
+ "[,}]" nil t)
(backward-char 1)
(point)))))))
files)
(setq refer-bib-files files))
files))
-;; arch-tag: 151f641b-e79b-462b-9a29-a95c3793f300
;;; refer.el ends here