]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/refer.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / textmodes / refer.el
index c35b76b30532b2b463355332ebba17bb54be529a..f2abf06ebdca8d0c1ad70e229ef8185d22b6b601 100644 (file)
@@ -1,7 +1,6 @@
 ;;; 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
@@ -96,7 +95,7 @@ happen anyway)."
   :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
@@ -115,7 +114,7 @@ each time it is needed."
   :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."
@@ -123,7 +122,7 @@ 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
@@ -230,7 +229,7 @@ found on the last `refer-find-entry' or `refer-find-next-entry'."
                     (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)
@@ -352,21 +351,21 @@ found on the last `refer-find-entry' or `refer-find-next-entry'."
                         (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)
@@ -396,5 +395,4 @@ found on the last `refer-find-entry' or `refer-find-next-entry'."
         (setq refer-bib-files files))
     files))
 
-;; arch-tag: 151f641b-e79b-462b-9a29-a95c3793f300
 ;;; refer.el ends here