emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104498: lisp/textmodes/bibtex.el (bi


From: Roland Winkler
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104498: lisp/textmodes/bibtex.el (bibtex-search-entry-globally): New variable
Date: Sat, 04 Jun 2011 23:47:45 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104498
committer: Roland Winkler <address@hidden>
branch nick: trunk
timestamp: Sat 2011-06-04 23:47:45 -0500
message:
  lisp/textmodes/bibtex.el (bibtex-search-entry-globally): New variable
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/textmodes/bibtex.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2011-06-05 04:39:40 +0000
+++ b/etc/NEWS  2011-06-05 04:47:45 +0000
@@ -440,6 +440,8 @@
 
 *** New `bibtex-entry-format' option `sort-fields', disabled by default.
 
+*** New variable `bibtex-search-entry-globally'.
+
 ** latex-electric-env-pair-mode keeps \begin..\end matched on the fly.
 
 ** FIXME: xdg-open for browse-url and reportbug, 2010/08.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-06-05 04:39:40 +0000
+++ b/lisp/ChangeLog    2011-06-05 04:47:45 +0000
@@ -1,5 +1,11 @@
 2011-06-05  Roland Winkler  <address@hidden>
 
+       * textmodes/bibtex.el (bibtex-search-entry-globally): New
+       variable.
+       (bibtex-search-entry): Use it.
+
+2011-06-05  Roland Winkler  <address@hidden>
+
        * textmodes/bibtex.el (bibtex-entry-format): New option
        sort-fields.
        (bibtex-format-entry, bibtex-reformat): Honor this option.

=== modified file 'lisp/textmodes/bibtex.el'
--- a/lisp/textmodes/bibtex.el  2011-06-05 04:39:40 +0000
+++ b/lisp/textmodes/bibtex.el  2011-06-05 04:47:45 +0000
@@ -597,7 +597,8 @@
 List elements can be absolute file names or file names relative to the
 directories specified in `bibtex-file-path'.  If an element is a directory,
 check all BibTeX files in this directory.  If an element is the symbol
-`bibtex-file-path', check all BibTeX files in `bibtex-file-path'."
+`bibtex-file-path', check all BibTeX files in `bibtex-file-path'.
+See also `bibtex-search-entry-globally'."
   :group 'bibtex
   :type '(repeat (choice (const :tag "bibtex-file-path" bibtex-file-path)
                          directory file)))
@@ -605,6 +606,12 @@
 (defvar bibtex-file-path (getenv "BIBINPUTS")
   "*Colon separated list of paths to search for `bibtex-files'.")
 
+(defcustom bibtex-search-entry-globally nil
+  "If non-nil, interactive calls of `bibtex-search-entry' search globally.
+A global search includes all files in `bibtex-files'."
+  :group 'bibtex
+  :type 'boolean)
+
 (defcustom bibtex-help-message t
   "If non-nil print help messages in the echo area on entering a new field."
   :group 'bibtex
@@ -3585,10 +3592,15 @@
 where the search starts.  If it is nil, start search at beginning of buffer.
 If DISPLAY is non-nil, display the buffer containing KEY.
 Otherwise, use `set-buffer'.
-When called interactively, GLOBAL is t if there is a prefix arg or the current
-mode is not `bibtex-mode', START is nil, and DISPLAY is t."
+When called interactively, START is nil, DISPLAY is t.
+Also, GLOBAL is t if the current mode is not `bibtex-mode'
+or `bibtex-search-entry-globally' is non-nil.
+A prefix arg negates the value of `bibtex-search-entry-globally'."
   (interactive
-   (let ((global (or current-prefix-arg (not (eq major-mode 'bibtex-mode)))))
+   (let ((global (or (not (eq major-mode 'bibtex-mode))
+                     (if bibtex-search-entry-globally
+                         (not current-prefix-arg)
+                       current-prefix-arg))))
      (list (bibtex-read-key "Find key: " nil global) global nil t)))
   (if (and global bibtex-files)
       (let ((buffer-list (bibtex-initialize t))


reply via email to

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