aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Winkler2011-06-04 23:47:45 -0500
committerRoland Winkler2011-06-04 23:47:45 -0500
commit022fe7ce8b7dafc7b3c0ebadeed4609a966ebe04 (patch)
treef0fec62be364349e6fae2470a920674250fb54b2
parentb7c3692a4c31b017e3c035f13588939e8a7f1251 (diff)
downloademacs-022fe7ce8b7dafc7b3c0ebadeed4609a966ebe04.tar.gz
emacs-022fe7ce8b7dafc7b3c0ebadeed4609a966ebe04.zip
lisp/textmodes/bibtex.el (bibtex-search-entry-globally): New variable
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/bibtex.el20
3 files changed, 24 insertions, 4 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 1013df219e4..9b1bb99eb1b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -440,6 +440,8 @@ Just set shell-dir-cookie-re to an appropriate regexp.
440 440
441*** New `bibtex-entry-format' option `sort-fields', disabled by default. 441*** New `bibtex-entry-format' option `sort-fields', disabled by default.
442 442
443*** New variable `bibtex-search-entry-globally'.
444
443** latex-electric-env-pair-mode keeps \begin..\end matched on the fly. 445** latex-electric-env-pair-mode keeps \begin..\end matched on the fly.
444 446
445** FIXME: xdg-open for browse-url and reportbug, 2010/08. 447** FIXME: xdg-open for browse-url and reportbug, 2010/08.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b719807701c..e2974bda4c7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12011-06-05 Roland Winkler <winkler@gnu.org> 12011-06-05 Roland Winkler <winkler@gnu.org>
2 2
3 * textmodes/bibtex.el (bibtex-search-entry-globally): New
4 variable.
5 (bibtex-search-entry): Use it.
6
72011-06-05 Roland Winkler <winkler@gnu.org>
8
3 * textmodes/bibtex.el (bibtex-entry-format): New option 9 * textmodes/bibtex.el (bibtex-entry-format): New option
4 sort-fields. 10 sort-fields.
5 (bibtex-format-entry, bibtex-reformat): Honor this option. 11 (bibtex-format-entry, bibtex-reformat): Honor this option.
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 149145a6bfe..349ab28b4d9 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -597,7 +597,8 @@ to the directories specified in `bibtex-string-file-path'."
597List elements can be absolute file names or file names relative to the 597List elements can be absolute file names or file names relative to the
598directories specified in `bibtex-file-path'. If an element is a directory, 598directories specified in `bibtex-file-path'. If an element is a directory,
599check all BibTeX files in this directory. If an element is the symbol 599check all BibTeX files in this directory. If an element is the symbol
600`bibtex-file-path', check all BibTeX files in `bibtex-file-path'." 600`bibtex-file-path', check all BibTeX files in `bibtex-file-path'.
601See also `bibtex-search-entry-globally'."
601 :group 'bibtex 602 :group 'bibtex
602 :type '(repeat (choice (const :tag "bibtex-file-path" bibtex-file-path) 603 :type '(repeat (choice (const :tag "bibtex-file-path" bibtex-file-path)
603 directory file))) 604 directory file)))
@@ -605,6 +606,12 @@ check all BibTeX files in this directory. If an element is the symbol
605(defvar bibtex-file-path (getenv "BIBINPUTS") 606(defvar bibtex-file-path (getenv "BIBINPUTS")
606 "*Colon separated list of paths to search for `bibtex-files'.") 607 "*Colon separated list of paths to search for `bibtex-files'.")
607 608
609(defcustom bibtex-search-entry-globally nil
610 "If non-nil, interactive calls of `bibtex-search-entry' search globally.
611A global search includes all files in `bibtex-files'."
612 :group 'bibtex
613 :type 'boolean)
614
608(defcustom bibtex-help-message t 615(defcustom bibtex-help-message t
609 "If non-nil print help messages in the echo area on entering a new field." 616 "If non-nil print help messages in the echo area on entering a new field."
610 :group 'bibtex 617 :group 'bibtex
@@ -3585,10 +3592,15 @@ is limited to the current buffer. Optional arg START is buffer position
3585where the search starts. If it is nil, start search at beginning of buffer. 3592where the search starts. If it is nil, start search at beginning of buffer.
3586If DISPLAY is non-nil, display the buffer containing KEY. 3593If DISPLAY is non-nil, display the buffer containing KEY.
3587Otherwise, use `set-buffer'. 3594Otherwise, use `set-buffer'.
3588When called interactively, GLOBAL is t if there is a prefix arg or the current 3595When called interactively, START is nil, DISPLAY is t.
3589mode is not `bibtex-mode', START is nil, and DISPLAY is t." 3596Also, GLOBAL is t if the current mode is not `bibtex-mode'
3597or `bibtex-search-entry-globally' is non-nil.
3598A prefix arg negates the value of `bibtex-search-entry-globally'."
3590 (interactive 3599 (interactive
3591 (let ((global (or current-prefix-arg (not (eq major-mode 'bibtex-mode))))) 3600 (let ((global (or (not (eq major-mode 'bibtex-mode))
3601 (if bibtex-search-entry-globally
3602 (not current-prefix-arg)
3603 current-prefix-arg))))
3592 (list (bibtex-read-key "Find key: " nil global) global nil t))) 3604 (list (bibtex-read-key "Find key: " nil global) global nil t)))
3593 (if (and global bibtex-files) 3605 (if (and global bibtex-files)
3594 (let ((buffer-list (bibtex-initialize t)) 3606 (let ((buffer-list (bibtex-initialize t))