1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
emacs/lisp/textmodes/reftex-cite.el

1267 lines
50 KiB
EmacsLisp
Raw Normal View History

;;; reftex-cite.el --- creating citations with RefTeX
2006-12-09 04:06:06 +00:00
;; Copyright (C) 1997-2019 Free Software Foundation, Inc.
1999-12-30 02:57:12 +00:00
2002-07-22 10:38:32 +00:00
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
1999-12-30 02:57:12 +00:00
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
1999-12-30 02:57:12 +00:00
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
1999-12-30 02:57:12 +00:00
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
1999-08-16 07:42:41 +00:00
;;; Commentary:
;;; Code:
Port RefTeX to cl-lib * lisp/textmodes/reftex-auc.el: * lisp/textmodes/reftex-cite.el: Use cl-lib. (reftex-do-citation, reftex-create-bibtex-file): Substitute cl-lib macros. * lisp/textmodes/reftex-dcr.el: Use cl-lib. (reftex-view-regexp-match): Substitute cl-lib macro. * lisp/textmodes/reftex-global.el: Use cl-lib. (reftex-find-duplicate-labels, reftex-renumber-simple-labels): (reftex-translate): Substitute cl-lib macros. * lisp/textmodes/reftex-index.el: Use cl-lib. (reftex-index, reftex-index-select-tag, reftex-index-mode-map): (reftex-index-next-phrase, reftex-index-phrases-info): (reftex-query-index-phrase): Substitute cl-lib macros. * lisp/textmodes/reftex-parse.el: Use cl-lib. (reftex-parse-from-file, reftex-where-am-I, reftex-what-macro): (reftex-nth-arg, reftex-init-section-numbers, reftex-section-number): Substitute cl-lib macros. * lisp/textmodes/reftex-ref.el: Use cl-lib. (reftex-uniquify-label, reftex-offer-label-menu): Substitute cl-lib macros. * lisp/textmodes/reftex-sel.el: Use cl-lib. (reftex-select-shared-map): Set keymap parent to special-mode-map. Flatten loop and remove digits and hyphen definitions from the map. (reftex-select-label-mode-map): (reftex-select-bib-mode-map): Use cl-lib macro, and flatten other loop. (reftex-insert-docstruct, reftex-select-unmark): Use cl-lib macros. * lisp/textmodes/reftex-vars.el (reftex-vref-is-default): Use cl-pushnew. * lisp/textmodes/reftex.el: Use cl-lib. (reftex-docstruct-symbol): Use cl-incf. (reftex-ref-style-toggle): Replace add-to-list with append. (reftex-compile-variables): Use cl-lib macros, and functions with compiler macros. cl-first is just an alias. (reftex-parse-args, reftex-scanning-info-available-p): (reftex-select-external-document, reftex-get-file-buffer-force): Use cl-lib macros. (reftex-isearch-minor-mode): Replace add-to-list with append.
2016-11-19 18:34:24 +00:00
(eval-when-compile (require 'cl-lib))
1999-08-16 07:42:41 +00:00
(require 'reftex)
1999-08-16 07:42:41 +00:00
;;; Variables and constants
(defvar reftex-cite-regexp-hist nil
"The history list of regular expressions used for citations")
1999-08-16 07:42:41 +00:00
(defconst reftex-citation-prompt
"Select: [n]ext [p]revious [r]estrict [ ]full_entry [q]uit RET [?]Help+more"
"Prompt and help string for citation selection")
1999-08-16 07:42:41 +00:00
(defconst reftex-citation-help
" n / p Go to next/previous entry (Cursor motion works as well).
g / r Start over with new regexp / Refine with additional regexp.
SPC Show full database entry in other window.
f Toggle follow mode: Other window will follow with full db entry.
. Show insertion point.
q Quit without inserting \\cite macro into buffer.
TAB Enter citation key with completion.
RET Accept current entry (also on mouse-2) and create \\cite macro.
m / u Mark/Unmark the entry.
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
e / E Create BibTeX file with all (marked/unmarked) entries
1999-08-16 07:42:41 +00:00
a / A Put all (marked) entries into one/many \\cite commands.")
;;; Find bibtex files
2002-07-22 10:38:32 +00:00
(defmacro reftex-with-special-syntax-for-bib (&rest body)
`(let ((saved-syntax (syntax-table)))
(unwind-protect
2003-08-11 12:27:02 +00:00
(progn
(set-syntax-table reftex-syntax-table-for-bib)
,@body)
2002-07-22 10:38:32 +00:00
(set-syntax-table saved-syntax))))
;;;###autoload
1999-08-16 07:42:41 +00:00
(defun reftex-default-bibliography ()
"Return the expanded value of variable `reftex-default-bibliography'.
The expanded value is cached."
1999-08-16 07:42:41 +00:00
(unless (eq (get 'reftex-default-bibliography :reftex-raw)
2003-08-11 12:27:02 +00:00
reftex-default-bibliography)
1999-08-16 07:42:41 +00:00
(put 'reftex-default-bibliography :reftex-expanded
2011-11-19 09:18:31 +00:00
(reftex-locate-bibliography-files
2003-08-11 12:27:02 +00:00
default-directory reftex-default-bibliography))
1999-08-16 07:42:41 +00:00
(put 'reftex-default-bibliography :reftex-raw
2003-08-11 12:27:02 +00:00
reftex-default-bibliography))
1999-08-16 07:42:41 +00:00
(get 'reftex-default-bibliography :reftex-expanded))
;;;###autoload
2002-08-20 10:42:52 +00:00
(defun reftex-bib-or-thebib ()
"Test if BibTeX or \\begin{thebibliography} should be used for the citation.
Find the bof of the current file"
2002-08-20 10:42:52 +00:00
(let* ((docstruct (symbol-value reftex-docstruct-symbol))
2003-08-11 12:27:02 +00:00
(rest (or (member (list 'bof (buffer-file-name)) docstruct)
docstruct))
(bib (assq 'bib rest))
(thebib (assq 'thebib rest))
(bibmem (memq bib rest))
(thebibmem (memq thebib rest)))
2002-08-20 10:42:52 +00:00
(when (not (or thebib bib))
(setq bib (assq 'bib docstruct)
2003-08-11 12:27:02 +00:00
thebib (assq 'thebib docstruct)
bibmem (memq bib docstruct)
thebibmem (memq thebib docstruct)))
2002-08-20 10:42:52 +00:00
(if (> (length bibmem) (length thebibmem))
2003-08-11 12:27:02 +00:00
(if bib 'bib nil)
2002-08-20 10:42:52 +00:00
(if thebib 'thebib nil))))
;;;###autoload
1999-08-16 07:42:41 +00:00
(defun reftex-get-bibfile-list ()
"Return list of bibfiles for current document.
When using the chapterbib or bibunits package you should either
use the same database files everywhere, or separate parts using
different databases into different files (included into the mater file).
Then this function will return the applicable database files."
1999-08-16 07:42:41 +00:00
;; Ensure access to scanning info
(reftex-access-scan-info)
(or
;; Try inside this file (and its includes)
(cdr (reftex-last-assoc-before-elt
'bib (list 'eof (buffer-file-name))
(member (list 'bof (buffer-file-name))
(symbol-value reftex-docstruct-symbol))))
;; Try after the beginning of this file
(cdr (assq 'bib (member (list 'bof (buffer-file-name))
(symbol-value reftex-docstruct-symbol))))
;; Anywhere in the entire document
(cdr (assq 'bib (symbol-value reftex-docstruct-symbol)))
(error "\\bibliography statement missing or .bib files not found")))
;;; Find a certain reference in any of the BibTeX files.
;;;###autoload
1999-08-16 07:42:41 +00:00
(defun reftex-pop-to-bibtex-entry (key file-list &optional mark-to-kill
2003-08-11 12:27:02 +00:00
highlight item return)
"Find BibTeX KEY in any file in FILE-LIST in another window.
If MARK-TO-KILL is non-nil, mark new buffer to kill.
If HIGHLIGHT is non-nil, highlight the match.
If ITEM in non-nil, search for bibitem instead of database entry.
If RETURN is non-nil, just return the entry and restore point."
1999-08-16 07:42:41 +00:00
(let* ((re
2011-11-19 09:18:31 +00:00
(if item
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(concat "\\\\bibitem[ \t]*\\(\\[[^]]*\\]\\)?[ \t]*{"
(regexp-quote key) "}")
(concat "@\\(?:\\w\\|\\s_\\)+[ \t\n\r]*[{(][ \t\n\r]*"
(regexp-quote key) "[, \t\r\n}]")))
2003-08-11 12:27:02 +00:00
(buffer-conf (current-buffer))
file buf pos oldpos)
1999-08-16 07:42:41 +00:00
(catch 'exit
(while file-list
(setq file (car file-list)
file-list (cdr file-list))
(unless (setq buf (reftex-get-file-buffer-force file mark-to-kill))
(error "No such file %s" file))
(set-buffer buf)
(setq oldpos (point))
1999-08-16 07:42:41 +00:00
(widen)
(goto-char (point-min))
(if (not (re-search-forward re nil t))
(goto-char oldpos) ;; restore previous position of point
1999-08-16 07:42:41 +00:00
(goto-char (match-beginning 0))
2003-08-11 12:27:02 +00:00
(setq pos (point))
(when return
;; Just return the relevant entry
(if item (goto-char (match-end 0)))
2011-11-19 09:18:31 +00:00
(setq return (buffer-substring
2003-08-11 12:27:02 +00:00
(point) (reftex-end-of-bib-entry item)))
(goto-char oldpos) ;; restore point.
2003-08-11 12:27:02 +00:00
(set-buffer buffer-conf)
(throw 'exit return))
(switch-to-buffer-other-window buf)
(goto-char pos)
1999-08-16 07:42:41 +00:00
(recenter 0)
(if highlight
(reftex-highlight 0 (match-beginning 0) (match-end 0)))
(throw 'exit (selected-window))))
(set-buffer buffer-conf)
(if item
2003-08-11 12:27:02 +00:00
(error "No \\bibitem with citation key %s" key)
(error "No BibTeX entry with citation key %s" key)))))
1999-08-16 07:42:41 +00:00
;;;###autoload
1999-08-16 07:42:41 +00:00
(defun reftex-end-of-bib-entry (item)
2011-11-19 09:18:31 +00:00
(save-excursion
1999-08-16 07:42:41 +00:00
(condition-case nil
2011-11-19 09:18:31 +00:00
(if item
2003-08-11 12:27:02 +00:00
(progn (end-of-line)
(re-search-forward
Fix regular-expression glitches and typos Problems reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-03/msg00085.html * admin/admin.el (set-version): * lisp/allout.el (allout-latexify-one-item): * lisp/arc-mode.el (archive-arc-rename-entry) (archive-rar-summarize): * lisp/calc/calc-graph.el (calc-graph-set-styles) (calc-graph-hide): * lisp/calc/calc-help.el (calc-describe-key): * lisp/calc/calc-lang.el (math-compose-tex-func, eqn): * lisp/calc/calc.el (calcDigit-key): * lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/comint.el (comint-substitute-in-file-name): * lisp/dired.el (dired-actual-switches): * lisp/emacs-lisp/chart.el (chart-rmail-from): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/rx.el (rx-not, rx-atomic-p): * lisp/emulation/viper-ex.el (viper-get-ex-token) (viper-get-ex-pat, ex-set-read-variable): * lisp/epg.el (epg--status-SIG_CREATED): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-user): (erc-speedbar-expand-channel, erc-speedbar-expand-server) * lisp/erc/erc.el (erc-is-message-ctcp-and-not-action-p) (erc-banlist-update): * lisp/eshell/em-dirs.el (eshell-parse-drive-letter, eshell/pwd): * lisp/find-dired.el (find-dired): * lisp/frame.el (frame-set-background-mode): * lisp/generic-x.el (apache-log-generic-mode): * lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp): * lisp/gnus/gnus.el (gnus-short-group-name): * lisp/gnus/message.el (message-mailer-swallows-blank-line): * lisp/ibuffer.el (ibuffer-fontification-alist): * lisp/ido.el (ido-set-matches-1): * lisp/info-xref.el (info-xref-lock-file-p): * lisp/info.el (Info-dir-remove-duplicates) (Info-unescape-quotes, Info-split-parameter-string) (Info-speedbar-expand-node): * lisp/international/mule.el (sgml-html-meta-auto-coding-function): * lisp/isearch.el (isearch-pre-command-hook): * lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer): * lisp/mail/rmail.el (rmail-collect-deleted): * lisp/mh-e/mh-alias.el (mh-alias-suggest-alias): * lisp/mh-e/mh-comp.el (mh-forward): * lisp/mh-e/mh-search.el (mh-index-next-folder) (mh-index-create-imenu-index): * lisp/mh-e/mh-xface.el (mh-picon-get-image): * lisp/minibuffer.el (completion--embedded-envvar-re): * lisp/net/ange-ftp.el (ange-ftp-ls-parser): * lisp/net/goto-addr.el (goto-address-mail-regexp) (goto-address-find-address-at-point): * lisp/net/pop3.el (pop3-read-response, pop3-user) (pop3-pass, pop3-apop): * lisp/net/tramp.el (tramp-ipv6-regexp) (tramp-replace-environment-variables): * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): * lisp/nxml/rng-uri.el (rng-uri-escape-multibyte): * lisp/nxml/rng-xsd.el (rng-xsd-convert-any-uri): * lisp/obsolete/pgg.el (pgg-fetch-key): * lisp/obsolete/vip.el (vip-get-ex-token): * lisp/org/ob-core.el (org-babel-string-read): * lisp/org/org-agenda.el: (org-agenda-add-entry-to-org-agenda-diary-file): * lisp/org/org-element.el (org-element-keyword-parser): * lisp/org/org-list.el (org-list-indent-item-generic): * lisp/org/org-mhe.el (org-mhe-get-message-folder-from-index): * lisp/org/org-mobile.el (org-mobile-apply): * lisp/org/org-mouse.el (org-mouse-context-menu): * lisp/org/org-plot.el (org-plot/gnuplot): * lisp/org/org-protocol.el (org-protocol-flatten-greedy): * lisp/org/org-table.el (org-table-copy-down) (org-table-formula-make-cmp-string) (org-table-get-stored-formulas, org-table-recalculate) (org-table-edit-formulas): * lisp/org/org.el (org-translate-link-from-planner) (org-fill-line-break-nobreak-p): * lisp/org/ox-ascii.el (org-ascii-item): * lisp/org/ox-latex.el (org-latex-clean-invalid-line-breaks): * lisp/org/ox.el (org-export-expand-include-keyword): * lisp/progmodes/ada-xref.el (ada-treat-cmd-string): * lisp/progmodes/cfengine.el (cfengine2-font-lock-keywords): * lisp/progmodes/cperl-mode.el (cperl-to-comment-or-eol) (cperl-find-pods-heres, cperl-fix-line-spacing) (cperl-have-help-regexp, cperl-word-at-point-hard) (cperl-make-regexp-x): * lisp/progmodes/dcl-mode.el (dcl-option-value-offset): * lisp/progmodes/etags.el (tag-implicit-name-match-p): * lisp/progmodes/fortran.el (fortran-fill): * lisp/progmodes/gdb-mi.el (gdb-speedbar-expand-node) (gdb-locals-handler-custom): * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): * lisp/progmodes/gud.el (gud-jdb-find-source-using-classpath): * lisp/progmodes/js.el (js--continued-expression-p): * lisp/progmodes/m4-mode.el (m4-font-lock-keywords): * lisp/progmodes/meta-mode.el (meta-indent-level-count): * lisp/progmodes/mixal-mode.el (mixal-font-lock-keywords): * lisp/progmodes/opascal.el (opascal-find-unit-in-directory): * lisp/progmodes/pascal.el (pascal-progbeg-re): * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re) (ruby-expr-beg, ruby-parse-partial) (ruby-toggle-string-quotes, ruby-font-lock-keywords): * lisp/progmodes/sql.el (sql--make-help-docstring): * lisp/progmodes/verilog-mode.el (verilog-coverpoint-re) (verilog-skip-forward-comment-p) (verilog-read-sub-decls-gate) (verilog-read-auto-template-middle): * lisp/progmodes/vhdl-mode.el (vhdl-resolve-env-variable) (vhdl-speedbar-expand-project, vhdl-speedbar-expand-entity) (vhdl-speedbar-expand-architecture) (vhdl-speedbar-expand-config, vhdl-speedbar-expand-package) (vhdl-speedbar-dired): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords): * lisp/textmodes/flyspell.el (flyspell-debug-signal-word-checked): * lisp/textmodes/ispell.el (ispell-process-line): * lisp/textmodes/reftex-cite.el (reftex-end-of-bib-entry): * lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes): * lisp/url/url-parse.el (url-generic-parse-url): * lisp/url/url-util.el (url-truncate-url-for-viewing): * lisp/vc/diff-mode.el (diff-unified->context): * lisp/vc/vc-bzr.el (vc-bzr-error-regexp-alist): * lisp/vc/vc-cvs.el (vc-cvs-parse-status): * lisp/woman.el (woman0-el, woman-if-ignore) (woman-change-fonts): * lisp/xdg.el (xdg--substitute-home-env): Fix regular-expression infelicities and typos. Fix regular expression typos Fix typos reported by Mattias Engdegård in: that occurred in preloaded modules. * lisp/frame.el (frame-set-background-mode): * lisp/international/mule.el (sgml-html-meta-auto-coding-function): * lisp/isearch.el (isearch-pre-command-hook): * lisp/minibuffer.el (completion--embedded-envvar-re):
2019-03-05 02:00:00 +00:00
"\\\\bibitem\\|\\\\end{thebibliography}")
2003-08-11 12:27:02 +00:00
(1- (match-beginning 0)))
(progn (forward-list 1) (point)))
1999-08-16 07:42:41 +00:00
(error (min (point-max) (+ 300 (point)))))))
(defun reftex--query-search-regexps (default)
"Query for regexps for searching entries using DEFAULT as default.
Return a list of regular expressions."
(split-string
(completing-read
(concat
"Regex { && Regex...}: "
"[" default "]: ")
;; Ensure default is always in the completion list.
(let ((def (when default (list default)))
(coll (if reftex-mode
(if (fboundp 'LaTeX-bibitem-list)
(LaTeX-bibitem-list)
(cdr (assoc 'bibview-cache
(symbol-value reftex-docstruct-symbol))))
nil)))
(if (and def (member def coll))
coll
(cons def coll)))
nil nil nil 'reftex-cite-regexp-hist)
"[ \t]*&&[ \t]*"))
;;; Parse bibtex buffers
2003-08-11 12:27:02 +00:00
(defun reftex-extract-bib-entries (buffers)
"Extract bib entries which match regexps from BUFFERS.
BUFFERS is a list of buffers or file names.
Return list with entries."
2003-08-11 12:27:02 +00:00
(let* (re-list first-re rest-re
(buffer-list (if (listp buffers) buffers (list buffers)))
found-list entry buffer1 buffer alist
key-point start-point end-point default)
;; Read a regexp, completing on known citation keys.
(setq default (regexp-quote (reftex-get-bibkey-default)))
(setq re-list (reftex--query-search-regexps default))
2003-08-11 12:27:02 +00:00
(if (or (null re-list ) (equal re-list '("")))
(setq re-list (list default)))
(setq first-re (car re-list) ; We'll use the first re to find things,
rest-re (cdr re-list)) ; the others to narrow down.
(if (string-match "\\`[ \t]*\\'" (or first-re ""))
(user-error "Empty regular expression"))
(if (string-match first-re "")
(user-error "Regular expression matches the empty string."))
1999-08-16 07:42:41 +00:00
(save-excursion
(save-window-excursion
;; Walk through all bibtex files
(while buffer-list
(setq buffer (car buffer-list)
buffer-list (cdr buffer-list))
(if (and (bufferp buffer)
(buffer-live-p buffer))
(setq buffer1 buffer)
(setq buffer1 (reftex-get-file-buffer-force
buffer (not reftex-keep-temporary-buffers))))
(if (not buffer1)
(message "No such BibTeX file %s (ignored)" buffer)
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(message "Scanning bibliography database %s" buffer1)
(unless (verify-visited-file-modtime buffer1)
(when (y-or-n-p
(format "File %s changed on disk. Reread from disk? "
(file-name-nondirectory
(buffer-file-name buffer1))))
(with-current-buffer buffer1 (revert-buffer t t)))))
1999-08-16 07:42:41 +00:00
(set-buffer buffer1)
2003-08-11 12:27:02 +00:00
(reftex-with-special-syntax-for-bib
(save-excursion
(goto-char (point-min))
(while (re-search-forward first-re nil t)
(catch 'search-again
(setq key-point (point))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(unless (re-search-backward "\\(\\`\\|[\n\r]\\)[ \t]*\
@\\(\\(?:\\w\\|\\s_\\)+\\)[ \t\n\r]*[{(]" nil t)
2003-08-11 12:27:02 +00:00
(throw 'search-again nil))
(setq start-point (point))
(goto-char (match-end 0))
(condition-case nil
(up-list 1)
(error (goto-char key-point)
1999-08-16 07:42:41 +00:00
(throw 'search-again nil)))
2003-08-11 12:27:02 +00:00
(setq end-point (point))
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; Ignore @string, @comment and @c entries or things
;; outside entries
(when (or (string= (downcase (match-string 2)) "string")
(string= (downcase (match-string 2)) "comment")
(string= (downcase (match-string 2)) "c")
(< (point) key-point)) ; this means match not in {}
(goto-char key-point)
(throw 'search-again nil))
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; Well, we have got a match
;;(setq entry (concat
;; (buffer-substring start-point (point)) "\n"))
(setq entry (buffer-substring start-point (point)))
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; Check if other regexp match as well
(setq re-list rest-re)
(while re-list
(unless (string-match (car re-list) entry)
;; nope - move on
(throw 'search-again nil))
(pop re-list))
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
(setq alist (reftex-parse-bibtex-entry
nil start-point end-point))
(push (cons "&entry" entry) alist)
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; check for crossref entries
(if (assoc "crossref" alist)
(setq alist
(append
alist (reftex-get-crossref-alist alist))))
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; format the entry
(push (cons "&formatted" (reftex-format-bib-entry alist))
alist)
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; make key the first element
(push (reftex-get-bib-field "&key" alist) alist)
2011-11-19 09:18:31 +00:00
2003-08-11 12:27:02 +00:00
;; add it to the list
(push alist found-list)))))
(reftex-kill-temporary-buffers))))
1999-08-16 07:42:41 +00:00
(setq found-list (nreverse found-list))
;; Sorting
(cond
((eq 'author reftex-sort-bibtex-matches)
(sort found-list 'reftex-bib-sort-author))
((eq 'year reftex-sort-bibtex-matches)
(sort found-list 'reftex-bib-sort-year))
((eq 'reverse-year reftex-sort-bibtex-matches)
(sort found-list 'reftex-bib-sort-year-reverse))
(t found-list))))
(defun reftex-bib-sort-author (e1 e2)
"Compare bib entries E1 and E2 by author.
The name of the first different author/editor is used."
1999-08-16 07:42:41 +00:00
(let ((al1 (reftex-get-bib-names "author" e1))
(al2 (reftex-get-bib-names "author" e2)))
(while (and al1 al2 (string= (car al1) (car al2)))
(pop al1)
(pop al2))
(if (and (stringp (car al1))
(stringp (car al2)))
(string< (car al1) (car al2))
(not (stringp (car al1))))))
(defun reftex-bib-sort-year (e1 e2)
"Compare bib entries E1 and E2 by year in ascending order."
(< (string-to-number (or (cdr (assoc "year" e1)) "0"))
(string-to-number (or (cdr (assoc "year" e2)) "0"))))
1999-08-16 07:42:41 +00:00
(defun reftex-bib-sort-year-reverse (e1 e2)
"Compare bib entries E1 and E2 by year in descending order."
(> (string-to-number (or (cdr (assoc "year" e1)) "0"))
(string-to-number (or (cdr (assoc "year" e2)) "0"))))
1999-08-16 07:42:41 +00:00
(defun reftex-get-crossref-alist (entry)
"Return the alist from a crossref ENTRY."
1999-08-16 07:42:41 +00:00
(let ((crkey (cdr (assoc "crossref" entry)))
start)
(save-excursion
(save-restriction
(widen)
(if (re-search-forward
(concat "@\\w+[{(][ \t\n\r]*" (regexp-quote crkey)
"[ \t\n\r]*,") nil t)
(progn
(setq start (match-beginning 0))
(condition-case nil
(up-list 1)
(error nil))
(reftex-parse-bibtex-entry nil start (point)))
nil)))))
2002-05-16 12:00:33 +00:00
;; Parse the bibliography environment
2003-08-11 12:27:02 +00:00
(defun reftex-extract-bib-entries-from-thebibliography (files)
"Extract bib-entries from the \begin{thebibliography} environment.
Parsing is not as good as for the BibTeX database stuff.
The environment should be located in FILES."
2003-08-11 12:27:02 +00:00
(let* (start end buf entries re re-list file default)
(unless files
1999-08-16 07:42:41 +00:00
(error "Need file name to find thebibliography environment"))
(while (setq file (pop files))
2011-11-19 09:18:31 +00:00
(setq buf (reftex-get-file-buffer-force
2003-08-11 12:27:02 +00:00
file (not reftex-keep-temporary-buffers)))
(unless buf
2003-08-11 12:27:02 +00:00
(error "No such file %s" file))
(message "Scanning thebibliography environment in %s" file)
1999-08-16 07:42:41 +00:00
* textmodes/two-column.el (2C-split): * textmodes/texnfo-upd.el (texinfo-multi-file-included-list): * textmodes/tex-mode.el (tex-set-buffer-directory): * textmodes/spell.el (spell-region, spell-string): * textmodes/reftex.el (reftex-erase-buffer): (reftex-get-file-buffer-force, reftex-kill-temporary-buffers): * textmodes/reftex-toc.el (reftex-toc-promote-action): * textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct) (reftex-select-item): * textmodes/reftex-ref.el (reftex-label-info-update) (reftex-offer-label-menu): * textmodes/reftex-index.el (reftex-index-change-entry) (reftex-index-phrases-info): * textmodes/reftex-global.el (reftex-create-tags-file) (reftex-save-all-document-buffers, reftex-ensure-write-access): * textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite) (reftex-view-crossref-from-bibtex): * textmodes/reftex-cite.el (reftex-bibtex-selection-callback) (reftex-extract-bib-entries-from-thebibliography) (reftex-all-used-citation-keys, reftex-create-bibtex-file): * textmodes/refbib.el (r2b-capitalize-title): (r2b-convert-buffer, r2b-help): * textmodes/page-ext.el (pages-directory) (pages-directory-goto-with-mouse): * textmodes/bibtex.el (bibtex-validate-globally): * textmodes/bib-mode.el (bib-capitalize-title): * textmodes/artist.el (artist-clear-buffer, artist-system): * progmodes/xscheme.el (global-set-scheme-interaction-buffer): (local-set-scheme-interaction-buffer, xscheme-process-filter) (verify-xscheme-buffer, xscheme-enter-interaction-mode) (xscheme-enter-debugger-mode, xscheme-debugger-mode-p) (xscheme-send-control-g-interrupt, xscheme-start-process) (xscheme-process-sentinel, xscheme-cd): * progmodes/verilog-mode.el (verilog-read-always-signals) (verilog-set-define, verilog-getopt-file) (verilog-module-inside-filename-p): * progmodes/sh-script.el: * progmodes/python.el (python-pdbtrack-get-source-buffer) (python-pdbtrack-grub-for-buffer, python-execute-file): * progmodes/octave-inf.el (inferior-octave): * progmodes/idlwave.el (idlwave-scan-user-lib-files) (idlwave-shell-compile-helper-routines, idlwave-set-local) (idlwave-display-completion-list-xemacs, idlwave-list-abbrevs) (idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows) (idlwave-completion-fontify-classes, idlwave-display-calling-sequence): * progmodes/idlw-shell.el (idlwave-shell-examine-display-clear) (idlwave-shell-filter, idlwave-shell-examine-highlight) (idlwave-shell-sentinel, idlwave-shell-filter-directory) (idlwave-shell-display-line, idlwave-shell-set-bp-in-module) (idlwave-shell-examine-display, idlwave-shell-run-region) (idlwave-shell-filter-bp, idlwave-shell-save-and-action) (idlwave-shell-sources-filter, idlwave-shell-goto-next-error): * progmodes/idlw-help.el (idlwave-help-get-special-help) (idlwave-help-get-help-buffer): * progmodes/gud.el (gud-basic-call, gud-find-class) (gud-tooltip-activate-mouse-motions-if-enabled): * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): * progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as) (ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file) (ebrowse-tags-next-file): * progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps) (ebnf-eps-production-list, ebnf-begin-file, ebnf-log) (ebnf-eps-finish-and-write): * progmodes/cpp.el (cpp-edit-save): * progmodes/cperl-mode.el (cperl-pod-to-manpage): * progmodes/cc-defs.el (c-emacs-features): * progmodes/antlr-mode.el (antlr-invalidate-context-cache) (antlr-directory-dependencies): * progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name) (ada-run-application, ada-find-in-src-path, ada-goto-parent) (ada-find-any-references, ada-make-filename-from-adaname) (ada-make-body-gnatstub): * obsolete/rnews.el (news-list-news-groups): * obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file): * obsolete/iso-acc.el (iso-acc-minibuf-setup): * net/rcirc.el (rcirc-debug): * net/newst-treeview.el (newsticker--treeview-list-add-item) (newsticker--treeview-list-clear, newsticker-treeview-browse-url) (newsticker--treeview-list-update-faces, newsticker-treeview-save) (newsticker--treeview-item-show-text, newsticker--treeview-item-show) (newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init) (newsticker-treeview-show-item, newsticker--treeview-unfold-node) (newsticker--treeview-list-clear-highlight) (newsticker--treeview-list-update-highlight) (newsticker--treeview-list-highlight-start) (newsticker--treeview-tree-update-highlight) (newsticker--treeview-get-selected-item) (newsticker-treeview-mark-list-items-old) (newsticker--treeview-set-current-node): * net/newst-plainview.el (newsticker--buffer-set-uptodate): * net/newst-backend.el (newsticker--get-news-by-funcall) (newsticker--get-news-by-wget, newsticker--image-get) (newsticker--image-sentinel): * net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field): * net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session): (eudc-ph-close-session): * net/eudc.el (eudc-save-options): * language/thai-word.el (thai-update-word-table): * language/japan-util.el (japanese-string-conversion): * international/titdic-cnv.el (tsang-quick-converter) (ziranma-converter, ctlau-converter): * international/mule-cmds.el (describe-language-environment): * international/ja-dic-cnv.el (skkdic-convert-okuri-ari) (skkdic-convert-postfix, skkdic-convert-prefix): (skkdic-convert-okuri-nasi, skkdic-convert): * emacs-lisp/re-builder.el (reb-update-overlays): * emacs-lisp/pp.el (pp-to-string, pp-display-expression): * emacs-lisp/gulp.el (gulp-send-requests): * emacs-lisp/find-gc.el (trace-call-tree): * emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class) (eieio-describe-generic): * emacs-lisp/eieio-base.el (eieio-persistent-read): * emacs-lisp/edebug.el (edebug-outside-excursion): * emacs-lisp/debug.el (debugger-make-xrefs): * emacs-lisp/cust-print.el (custom-prin1-to-string): * emacs-lisp/chart.el (chart-new-buffer): * emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log): Use with-current-buffer. * textmodes/artist.el (artist-system): Don't call copy-sequence on a fresh string. * progmodes/idlw-shell.el (easymenu setup): Use dolist.
2009-10-31 02:38:34 +00:00
(with-current-buffer buf
2010-10-16 15:08:47 +00:00
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward
"\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
(beginning-of-line 2)
(setq start (point))
(if (re-search-forward
"\\(\\`\\|[\n\r]\\)[ \t]*\\\\end{thebibliography}" nil t)
(progn
(beginning-of-line 1)
(setq end (point))))
(when (and start end)
(setq entries
(append entries
(mapcar 'reftex-parse-bibitem
(delete ""
(split-string
(buffer-substring-no-properties
start end)
"[ \t\n\r]*\\\\bibitem[ \t]*\
\\(\\[[^]]*]\\)*[ \t]*"))))))
2010-10-16 15:08:47 +00:00
(goto-char end))))))
1999-08-16 07:42:41 +00:00
(unless entries
(error "No bibitems found"))
2003-08-11 12:27:02 +00:00
;; Read a regexp, completing on known citation keys.
(setq default (regexp-quote (reftex-get-bibkey-default)))
(setq re-list (reftex--query-search-regexps default))
2003-08-11 12:27:02 +00:00
(if (or (null re-list ) (equal re-list '("")))
(setq re-list (list default)))
(if (string-match "\\`[ \t]*\\'" (car re-list))
(error "Empty regular expression"))
1999-08-16 07:42:41 +00:00
(while (and (setq re (pop re-list)) entries)
2011-11-19 09:18:31 +00:00
(setq entries
2003-08-11 12:27:02 +00:00
(delq nil (mapcar
(lambda (x)
(if (string-match re (cdr (assoc "&entry" x)))
x nil))
entries))))
2011-11-19 09:18:31 +00:00
(setq entries
(mapcar
2003-08-11 12:27:02 +00:00
(lambda (x)
(push (cons "&formatted" (reftex-format-bibitem x)) x)
(push (reftex-get-bib-field "&key" x) x)
x)
entries))
1999-08-16 07:42:41 +00:00
entries))
2002-07-25 07:03:41 +00:00
(defun reftex-get-bibkey-default ()
"Return the word before the cursor.
If the cursor is in a citation macro, return the word before the macro."
2002-07-25 07:03:41 +00:00
(let* ((macro (reftex-what-macro 1)))
(save-excursion
(if (and macro (string-match "cite" (car macro)))
2003-08-11 12:27:02 +00:00
(goto-char (cdr macro)))
2002-07-25 07:03:41 +00:00
(skip-chars-backward "^a-zA-Z0-9")
(reftex-this-word))))
;;; Parse and format individual entries
1999-08-16 07:42:41 +00:00
(defun reftex-get-bib-names (field entry)
"Return a list with the author or editor names in ENTRY.
If FIELD is empty try \"editor\" field."
1999-08-16 07:42:41 +00:00
(let ((names (reftex-get-bib-field field entry)))
(if (equal "" names)
(setq names (reftex-get-bib-field "editor" entry)))
(while (string-match "\\band\\b[ \t]*" names)
(setq names (replace-match "\n" nil t names)))
Fix regular-expression glitches and typos Problems reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-03/msg00085.html * admin/admin.el (set-version): * lisp/allout.el (allout-latexify-one-item): * lisp/arc-mode.el (archive-arc-rename-entry) (archive-rar-summarize): * lisp/calc/calc-graph.el (calc-graph-set-styles) (calc-graph-hide): * lisp/calc/calc-help.el (calc-describe-key): * lisp/calc/calc-lang.el (math-compose-tex-func, eqn): * lisp/calc/calc.el (calcDigit-key): * lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/comint.el (comint-substitute-in-file-name): * lisp/dired.el (dired-actual-switches): * lisp/emacs-lisp/chart.el (chart-rmail-from): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/rx.el (rx-not, rx-atomic-p): * lisp/emulation/viper-ex.el (viper-get-ex-token) (viper-get-ex-pat, ex-set-read-variable): * lisp/epg.el (epg--status-SIG_CREATED): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-user): (erc-speedbar-expand-channel, erc-speedbar-expand-server) * lisp/erc/erc.el (erc-is-message-ctcp-and-not-action-p) (erc-banlist-update): * lisp/eshell/em-dirs.el (eshell-parse-drive-letter, eshell/pwd): * lisp/find-dired.el (find-dired): * lisp/frame.el (frame-set-background-mode): * lisp/generic-x.el (apache-log-generic-mode): * lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp): * lisp/gnus/gnus.el (gnus-short-group-name): * lisp/gnus/message.el (message-mailer-swallows-blank-line): * lisp/ibuffer.el (ibuffer-fontification-alist): * lisp/ido.el (ido-set-matches-1): * lisp/info-xref.el (info-xref-lock-file-p): * lisp/info.el (Info-dir-remove-duplicates) (Info-unescape-quotes, Info-split-parameter-string) (Info-speedbar-expand-node): * lisp/international/mule.el (sgml-html-meta-auto-coding-function): * lisp/isearch.el (isearch-pre-command-hook): * lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer): * lisp/mail/rmail.el (rmail-collect-deleted): * lisp/mh-e/mh-alias.el (mh-alias-suggest-alias): * lisp/mh-e/mh-comp.el (mh-forward): * lisp/mh-e/mh-search.el (mh-index-next-folder) (mh-index-create-imenu-index): * lisp/mh-e/mh-xface.el (mh-picon-get-image): * lisp/minibuffer.el (completion--embedded-envvar-re): * lisp/net/ange-ftp.el (ange-ftp-ls-parser): * lisp/net/goto-addr.el (goto-address-mail-regexp) (goto-address-find-address-at-point): * lisp/net/pop3.el (pop3-read-response, pop3-user) (pop3-pass, pop3-apop): * lisp/net/tramp.el (tramp-ipv6-regexp) (tramp-replace-environment-variables): * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): * lisp/nxml/rng-uri.el (rng-uri-escape-multibyte): * lisp/nxml/rng-xsd.el (rng-xsd-convert-any-uri): * lisp/obsolete/pgg.el (pgg-fetch-key): * lisp/obsolete/vip.el (vip-get-ex-token): * lisp/org/ob-core.el (org-babel-string-read): * lisp/org/org-agenda.el: (org-agenda-add-entry-to-org-agenda-diary-file): * lisp/org/org-element.el (org-element-keyword-parser): * lisp/org/org-list.el (org-list-indent-item-generic): * lisp/org/org-mhe.el (org-mhe-get-message-folder-from-index): * lisp/org/org-mobile.el (org-mobile-apply): * lisp/org/org-mouse.el (org-mouse-context-menu): * lisp/org/org-plot.el (org-plot/gnuplot): * lisp/org/org-protocol.el (org-protocol-flatten-greedy): * lisp/org/org-table.el (org-table-copy-down) (org-table-formula-make-cmp-string) (org-table-get-stored-formulas, org-table-recalculate) (org-table-edit-formulas): * lisp/org/org.el (org-translate-link-from-planner) (org-fill-line-break-nobreak-p): * lisp/org/ox-ascii.el (org-ascii-item): * lisp/org/ox-latex.el (org-latex-clean-invalid-line-breaks): * lisp/org/ox.el (org-export-expand-include-keyword): * lisp/progmodes/ada-xref.el (ada-treat-cmd-string): * lisp/progmodes/cfengine.el (cfengine2-font-lock-keywords): * lisp/progmodes/cperl-mode.el (cperl-to-comment-or-eol) (cperl-find-pods-heres, cperl-fix-line-spacing) (cperl-have-help-regexp, cperl-word-at-point-hard) (cperl-make-regexp-x): * lisp/progmodes/dcl-mode.el (dcl-option-value-offset): * lisp/progmodes/etags.el (tag-implicit-name-match-p): * lisp/progmodes/fortran.el (fortran-fill): * lisp/progmodes/gdb-mi.el (gdb-speedbar-expand-node) (gdb-locals-handler-custom): * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): * lisp/progmodes/gud.el (gud-jdb-find-source-using-classpath): * lisp/progmodes/js.el (js--continued-expression-p): * lisp/progmodes/m4-mode.el (m4-font-lock-keywords): * lisp/progmodes/meta-mode.el (meta-indent-level-count): * lisp/progmodes/mixal-mode.el (mixal-font-lock-keywords): * lisp/progmodes/opascal.el (opascal-find-unit-in-directory): * lisp/progmodes/pascal.el (pascal-progbeg-re): * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re) (ruby-expr-beg, ruby-parse-partial) (ruby-toggle-string-quotes, ruby-font-lock-keywords): * lisp/progmodes/sql.el (sql--make-help-docstring): * lisp/progmodes/verilog-mode.el (verilog-coverpoint-re) (verilog-skip-forward-comment-p) (verilog-read-sub-decls-gate) (verilog-read-auto-template-middle): * lisp/progmodes/vhdl-mode.el (vhdl-resolve-env-variable) (vhdl-speedbar-expand-project, vhdl-speedbar-expand-entity) (vhdl-speedbar-expand-architecture) (vhdl-speedbar-expand-config, vhdl-speedbar-expand-package) (vhdl-speedbar-dired): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords): * lisp/textmodes/flyspell.el (flyspell-debug-signal-word-checked): * lisp/textmodes/ispell.el (ispell-process-line): * lisp/textmodes/reftex-cite.el (reftex-end-of-bib-entry): * lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes): * lisp/url/url-parse.el (url-generic-parse-url): * lisp/url/url-util.el (url-truncate-url-for-viewing): * lisp/vc/diff-mode.el (diff-unified->context): * lisp/vc/vc-bzr.el (vc-bzr-error-regexp-alist): * lisp/vc/vc-cvs.el (vc-cvs-parse-status): * lisp/woman.el (woman0-el, woman-if-ignore) (woman-change-fonts): * lisp/xdg.el (xdg--substitute-home-env): Fix regular-expression infelicities and typos. Fix regular expression typos Fix typos reported by Mattias Engdegård in: that occurred in preloaded modules. * lisp/frame.el (frame-set-background-mode): * lisp/international/mule.el (sgml-html-meta-auto-coding-function): * lisp/isearch.el (isearch-pre-command-hook): * lisp/minibuffer.el (completion--embedded-envvar-re):
2019-03-05 02:00:00 +00:00
(while (string-match "[-.a-zA-Z]+\\.[ \t]*\\|,.*\\|[{}]+" names)
1999-08-16 07:42:41 +00:00
(setq names (replace-match "" nil t names)))
(while (string-match "^[ \t]+\\|[ \t]+$" names)
(setq names (replace-match "" nil t names)))
(while (string-match "[ \t][ \t]+" names)
(setq names (replace-match " " nil t names)))
(split-string names "\n")))
;;;###autoload
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(defun reftex-parse-bibtex-entry (entry &optional from to raw)
"Parse BibTeX ENTRY.
If ENTRY is nil then parse the entry in current buffer between FROM and TO.
If RAW is non-nil, keep double quotes/curly braces delimiting fields."
1999-08-16 07:42:41 +00:00
(let (alist key start field)
(save-excursion
(save-restriction
(if entry
(progn
(set-buffer (get-buffer-create " *RefTeX-scratch*"))
(fundamental-mode)
2003-08-11 12:27:02 +00:00
(set-syntax-table reftex-syntax-table-for-bib)
1999-08-16 07:42:41 +00:00
(erase-buffer)
(insert entry))
(widen)
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(if (and from to) (narrow-to-region from to)))
1999-08-16 07:42:41 +00:00
(goto-char (point-min))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(if (re-search-forward "@\\(\\(?:\\w\\|\\s_\\)+\\)[ \t\n\r]*\
[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t)
1999-08-16 07:42:41 +00:00
(setq alist
(list
(cons "&type" (downcase (reftex-match-string 1)))
(cons "&key" (reftex-match-string 2)))))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(while (re-search-forward "\\(\\(?:\\w\\|-\\)+\\)[ \t\n\r]*=[ \t\n\r]*"
nil t)
1999-08-16 07:42:41 +00:00
(setq key (downcase (reftex-match-string 1)))
(cond
((= (following-char) ?{)
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(cond
(raw
(setq start (point))
(forward-char 1))
(t
(forward-char 1)
(setq start (point))
(condition-case nil
(up-list 1)
(error nil)))))
1999-08-16 07:42:41 +00:00
((= (following-char) ?\")
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(cond
(raw
(setq start (point))
(forward-char 1))
(t
(forward-char 1)
(setq start (point))))
1999-08-16 07:42:41 +00:00
(while (and (search-forward "\"" nil t)
(= ?\\ (char-after (- (point) 2))))))
(t
(setq start (point))
(re-search-forward "[ \t]*[\n\r,}]" nil 1)))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
;; extract field value, ignore trailing comma if in RAW mode
(let ((stop (if (and raw (not (= (char-after (1- (point))) ?,)))
(point)
(1- (point))) ))
(setq field (buffer-substring-no-properties start stop)))
1999-08-16 07:42:41 +00:00
;; remove extra whitespace
(while (string-match "[\n\t\r]\\|[ \t][ \t]+" field)
(setq field (replace-match " " nil t field)))
(push (cons key field) alist))))
alist))
(defun reftex-get-bib-field (fieldname entry &optional format)
"Extract the field FIELDNAME from ENTRY.
If FORMAT is non-nil `format' entry accordingly."
1999-08-16 07:42:41 +00:00
(let ((cell (assoc fieldname entry)))
(if cell
2003-08-11 12:27:02 +00:00
(if format
(format format (cdr cell))
(cdr cell))
1999-08-16 07:42:41 +00:00
"")))
(defun reftex-format-bib-entry (entry)
"Format a BibTeX ENTRY so that it is nice to look at."
1999-08-16 07:42:41 +00:00
(let*
((auth-list (reftex-get-bib-names "author" entry))
(authors (mapconcat 'identity auth-list ", "))
(year (reftex-get-bib-field "year" entry))
(title (reftex-get-bib-field "title" entry))
(type (reftex-get-bib-field "&type" entry))
(key (reftex-get-bib-field "&key" entry))
(extra
(cond
((equal type "article")
(concat (let ((jt (reftex-get-bib-field "journal" entry)))
;; biblatex prefers the alternative journaltitle
;; field, so check if that exists in case journal
;; is empty.
(if (zerop (length jt))
(reftex-get-bib-field "journaltitle" entry)
jt))
" "
1999-08-16 07:42:41 +00:00
(reftex-get-bib-field "volume" entry) ", "
(reftex-get-bib-field "pages" entry)))
((equal type "book")
(concat "book (" (reftex-get-bib-field "publisher" entry) ")"))
((equal type "phdthesis")
(concat "PhD: " (reftex-get-bib-field "school" entry)))
((equal type "mastersthesis")
(concat "Master: " (reftex-get-bib-field "school" entry)))
((equal type "inbook")
(concat "Chap: " (reftex-get-bib-field "chapter" entry)
", pp. " (reftex-get-bib-field "pages" entry)))
((or (equal type "conference")
(equal type "incollection")
(equal type "inproceedings"))
(reftex-get-bib-field "booktitle" entry "in: %s"))
(t ""))))
(setq authors (reftex-truncate authors 30 t t))
(when (reftex-use-fonts)
(put-text-property 0 (length key) 'face reftex-label-face
1999-08-16 07:42:41 +00:00
key)
(put-text-property 0 (length authors) 'face reftex-bib-author-face
authors)
(put-text-property 0 (length year) 'face reftex-bib-year-face
year)
(put-text-property 0 (length title) 'face reftex-bib-title-face
title)
(put-text-property 0 (length extra) 'face reftex-bib-extra-face
extra))
(concat key "\n " authors " " year " " extra "\n " title "\n\n")))
(defun reftex-parse-bibitem (item)
"Parse a \bibitem entry in ITEM."
1999-08-16 07:42:41 +00:00
(let ((key "") (text ""))
(when (string-match "\\`{\\([^}]+\\)}\\([^\000]*\\)" item)
1999-08-16 07:42:41 +00:00
(setq key (match-string 1 item)
2003-08-11 12:27:02 +00:00
text (match-string 2 item)))
1999-08-16 07:42:41 +00:00
;; Clean up the text a little bit
(while (string-match "[\n\r\t]\\|[ \t][ \t]+" text)
(setq text (replace-match " " nil t text)))
(if (string-match "\\`[ \t]+" text)
2003-08-11 12:27:02 +00:00
(setq text (replace-match "" nil t text)))
1999-08-16 07:42:41 +00:00
(list
(cons "&key" key)
(cons "&text" text)
(cons "&entry" (concat key " " text)))))
(defun reftex-format-bibitem (item)
"Format a \bibitem entry in ITEM so that it is (relatively) nice to look at."
1999-08-16 07:42:41 +00:00
(let ((text (reftex-get-bib-field "&text" item))
2003-08-11 12:27:02 +00:00
(key (reftex-get-bib-field "&key" item))
(lines nil))
1999-08-16 07:42:41 +00:00
;; Wrap the text into several lines.
(while (and (> (length text) 70)
2003-08-11 12:27:02 +00:00
(string-match " " (substring text 60)))
(push (substring text 0 (+ 60 (match-beginning 0))) lines)
(setq text (substring text (+ 61 (match-beginning 0)))))
1999-08-16 07:42:41 +00:00
(push text lines)
(setq text (mapconcat 'identity (nreverse lines) "\n "))
(when (reftex-use-fonts)
(put-text-property 0 (length text) 'face reftex-bib-author-face text))
(concat key "\n " text "\n\n")))
;;; Make a citation
1999-08-16 07:42:41 +00:00
;; NB this is a global autoload - see reftex.el.
1999-08-16 07:42:41 +00:00
;;;###autoload
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(defun reftex-citation (&optional no-insert format-key)
1999-08-16 07:42:41 +00:00
"Make a citation using BibTeX database files.
After prompting for a regular expression, scans the buffers with
bibtex entries (taken from the \\bibliography command) and offers the
2002-07-02 14:49:40 +00:00
matching entries for selection. The selected entry is formatted according
1999-08-16 07:42:41 +00:00
to `reftex-cite-format' and inserted into the buffer.
If NO-INSERT is non-nil, nothing is inserted, only the selected key returned.
FORMAT-KEY can be used to pre-select a citation format.
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
When called with a `C-u' prefix, prompt for optional arguments in
cite macros. When called with a numeric prefix, make that many
citations. When called with point inside the braces of a `\\cite'
command, it will add another key, ignoring the value of
`reftex-cite-format'.
1999-08-16 07:42:41 +00:00
The regular expression uses an expanded syntax: && is interpreted as `and'.
Thus, `aaaa&&bbb' matches entries which contain both `aaaa' and `bbb'.
While entering the regexp, completion on knows citation keys is possible.
`=' is a good regular expression to match all entries in all files."
(interactive)
;; check for recursive edit
(reftex-check-recursive-edit)
;; This function may also be called outside reftex-mode.
;; Thus look for the scanning info only if in reftex-mode.
(when reftex-mode
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(reftex-access-scan-info nil))
1999-08-16 07:42:41 +00:00
;; Call reftex-do-citation, but protected
(unwind-protect
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(reftex-do-citation current-prefix-arg no-insert format-key)
1999-08-16 07:42:41 +00:00
(reftex-kill-temporary-buffers)))
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(defun reftex-do-citation (&optional arg no-insert format-key)
"This really does the work of `reftex-citation'."
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(let* ((format (reftex-figure-out-cite-format arg no-insert format-key))
2003-08-11 12:27:02 +00:00
(docstruct-symbol reftex-docstruct-symbol)
(selected-entries (reftex-offer-bib-menu))
(insert-entries selected-entries)
entry string cite-view)
1999-08-16 07:42:41 +00:00
(unless selected-entries (error "Quit"))
(if (stringp selected-entries)
2003-08-11 12:27:02 +00:00
;; Nonexistent entry
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(setq insert-entries (list (list selected-entries
(cons "&key" selected-entries)))
selected-entries nil)
1999-08-16 07:42:41 +00:00
;; It makes sense to compute the cite-view strings.
(setq cite-view t))
(when (eq (car selected-entries) 'concat)
;; All keys go into a single command - we need to trick a little
2011-11-19 09:18:31 +00:00
;; FIXME: Unfortunately, this means that commenting does not work right.
1999-08-16 07:42:41 +00:00
(pop selected-entries)
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(let ((concat-keys (mapconcat 'car selected-entries
reftex-cite-key-separator)))
2011-11-19 09:18:31 +00:00
(setq insert-entries
2003-08-11 12:27:02 +00:00
(list (list concat-keys (cons "&key" concat-keys))))))
2011-11-19 09:18:31 +00:00
1999-08-16 07:42:41 +00:00
(unless no-insert
;; We shall insert this into the buffer...
(message "Formatting...")
1999-08-16 07:42:41 +00:00
(while (setq entry (pop insert-entries))
2003-08-11 12:27:02 +00:00
;; Format the citation and insert it
(setq string (if reftex-format-cite-function
(funcall reftex-format-cite-function
(reftex-get-bib-field "&key" entry)
format)
(reftex-format-citation entry format)))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(when (or (eq reftex-cite-prompt-optional-args t)
(and reftex-cite-prompt-optional-args
(equal arg '(4))))
(let ((start 0) (nth 0) value)
(while (setq start (string-match "\\[\\]" string start))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(setq value (save-match-data
(read-string (format "Optional argument %d: "
(setq nth (1+ nth))))))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(setq string (replace-match (concat "[" value "]") t t string))
(setq start (1+ start)))))
;; Should we cleanup empty optional arguments?
;; if the first is empty, it can be removed. If the second is empty,
;; it has to go. If there is only a single arg and empty, it can go
;; as well.
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(when reftex-cite-cleanup-optional-args
(cond
((string-match "\\([a-zA-Z0-9]\\)\\[\\]{" string)
(setq string (replace-match "\\1{" nil nil string)))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string)
(setq string (replace-match "\\1" nil nil string)))
((string-match "\\[\\]\\[\\]" string)
(setq string (replace-match "" t t string)))))
2003-08-11 12:27:02 +00:00
(insert string))
1999-08-16 07:42:41 +00:00
;; Reposition cursor?
(when (string-match "\\?" string)
2003-08-11 12:27:02 +00:00
(search-backward "?")
(delete-char 1))
1999-08-16 07:42:41 +00:00
;; Tell AUCTeX
(when (and reftex-mode
2003-08-11 12:27:02 +00:00
(fboundp 'LaTeX-add-bibitems)
reftex-plug-into-AUCTeX)
(apply 'LaTeX-add-bibitems (mapcar 'car selected-entries)))
1999-08-16 07:42:41 +00:00
;; Produce the cite-view strings
(when (and reftex-mode reftex-cache-cite-echo cite-view)
(mapc (lambda (entry)
(reftex-make-cite-echo-string entry docstruct-symbol))
selected-entries))
1999-08-16 07:42:41 +00:00
(message ""))
(set-marker reftex-select-return-marker nil)
(reftex-kill-buffer "*RefTeX Select*")
1999-08-16 07:42:41 +00:00
;; Check if the prefix arg was numeric, and call recursively
(when (integerp arg)
(if (> arg 1)
(progn
2003-08-11 12:27:02 +00:00
(skip-chars-backward "}")
Port RefTeX to cl-lib * lisp/textmodes/reftex-auc.el: * lisp/textmodes/reftex-cite.el: Use cl-lib. (reftex-do-citation, reftex-create-bibtex-file): Substitute cl-lib macros. * lisp/textmodes/reftex-dcr.el: Use cl-lib. (reftex-view-regexp-match): Substitute cl-lib macro. * lisp/textmodes/reftex-global.el: Use cl-lib. (reftex-find-duplicate-labels, reftex-renumber-simple-labels): (reftex-translate): Substitute cl-lib macros. * lisp/textmodes/reftex-index.el: Use cl-lib. (reftex-index, reftex-index-select-tag, reftex-index-mode-map): (reftex-index-next-phrase, reftex-index-phrases-info): (reftex-query-index-phrase): Substitute cl-lib macros. * lisp/textmodes/reftex-parse.el: Use cl-lib. (reftex-parse-from-file, reftex-where-am-I, reftex-what-macro): (reftex-nth-arg, reftex-init-section-numbers, reftex-section-number): Substitute cl-lib macros. * lisp/textmodes/reftex-ref.el: Use cl-lib. (reftex-uniquify-label, reftex-offer-label-menu): Substitute cl-lib macros. * lisp/textmodes/reftex-sel.el: Use cl-lib. (reftex-select-shared-map): Set keymap parent to special-mode-map. Flatten loop and remove digits and hyphen definitions from the map. (reftex-select-label-mode-map): (reftex-select-bib-mode-map): Use cl-lib macro, and flatten other loop. (reftex-insert-docstruct, reftex-select-unmark): Use cl-lib macros. * lisp/textmodes/reftex-vars.el (reftex-vref-is-default): Use cl-pushnew. * lisp/textmodes/reftex.el: Use cl-lib. (reftex-docstruct-symbol): Use cl-incf. (reftex-ref-style-toggle): Replace add-to-list with append. (reftex-compile-variables): Use cl-lib macros, and functions with compiler macros. cl-first is just an alias. (reftex-parse-args, reftex-scanning-info-available-p): (reftex-select-external-document, reftex-get-file-buffer-force): Use cl-lib macros. (reftex-isearch-minor-mode): Replace add-to-list with append.
2016-11-19 18:34:24 +00:00
(cl-decf arg)
2003-08-11 12:27:02 +00:00
(reftex-do-citation arg))
(forward-char 1)))
1999-08-16 07:42:41 +00:00
;; Return the citation key
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(mapcar 'car selected-entries)))
1999-08-16 07:42:41 +00:00
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(defun reftex-figure-out-cite-format (arg &optional no-insert format-key)
"Check if there is already a cite command at point and change cite format
in order to only add another reference in the same cite command."
1999-08-16 07:42:41 +00:00
(let ((macro (car (reftex-what-macro 1)))
2003-08-11 12:27:02 +00:00
(cite-format-value (reftex-get-cite-format))
key format)
1999-08-16 07:42:41 +00:00
(cond
(no-insert
;; Format does not really matter because nothing will be inserted.
(setq format "%l"))
1999-08-16 07:42:41 +00:00
((and (stringp macro)
2003-08-11 12:27:02 +00:00
(string-match "\\`\\\\cite\\|cite\\'" macro))
1999-08-16 07:42:41 +00:00
;; We are already inside a cite macro
(if (or (not arg) (not (listp arg)))
2003-08-11 12:27:02 +00:00
(setq format
(concat
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(if (member (preceding-char) '(?\{ ?,))
""
reftex-cite-key-separator)
2003-08-11 12:27:02 +00:00
"%l"
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(if (member (following-char) '(?\} ?,))
""
reftex-cite-key-separator)))
2003-08-11 12:27:02 +00:00
(setq format "%l")))
1999-08-16 07:42:41 +00:00
(t
;; Figure out the correct format
(setq format
(if (and (symbolp cite-format-value)
2003-08-11 12:27:02 +00:00
(assq cite-format-value reftex-cite-format-builtin))
(nth 2 (assq cite-format-value reftex-cite-format-builtin))
cite-format-value))
1999-08-16 07:42:41 +00:00
(when (listp format)
2003-08-11 12:27:02 +00:00
(setq key
(or format-key
(reftex-select-with-char
2003-08-11 12:27:02 +00:00
"" (concat "SELECT A CITATION FORMAT\n\n"
(mapconcat
(lambda (x)
(format "[%c] %s %s" (car x)
(if (> (car x) 31) " " "")
(cdr x)))
format "\n")))))
(if (assq key format)
(setq format (cdr (assq key format)))
(error "No citation format associated with key `%c'" key)))))
1999-08-16 07:42:41 +00:00
format))
;;;###autoload
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(defun reftex-citep ()
"Call `reftex-citation' with a format selector `?p'."
(interactive)
(reftex-citation nil ?p))
;;;###autoload
* reftex.el (reftex-compile-variables): respect new structure of `reftex-index-macro' (reftex-compile-variables): Use the changed structure of `reftex-label-alist'. * reftex-vars.el (reftex-index-math-format, (reftex-toc-max-level): New option. reftex-index-phrases-search-whole-words, reftex-index-phrases-case-fold-search, reftex-index-phrases-skip-indexed-matches, reftex-index-phrases-wrap-long-lines, reftex-index-phrases-sort-prefers-entry, reftex-index-phrases-sort-in-blocks): New options. (reftex-index-macros): Option structure changed. (reftex-index-macros-builtin): Added `repeat' item to each entry. (reftex-label-alist): Additional item in each entry to specify if the environment should be listed in the TOC. (eval-when-compile (require 'cl)) added. * reftex-index.el (reftex-index-selection-or-word): No longer deals with "repeat". (reftex-index): "repeat property in `reftex-index-macro-alist' is now used. (reftex-index-phrases-comment-regexp, reftex-index-phrases-macrodef-regexp, reftex-index-phrases-phrase-regexp1, reftex-index-phrases-phrase-regexp2, reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help): New constants. (reftex-index-phrases-macro-data, reftex-index-phrases-files, reftex-index-phrases-font-lock-keywords, reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map, reftex-index-phrases-restrict-file): New variables. (reftex-index-phrase-selection-or-word, reftex-index-visit-phrases-buffer, reftex-index-initialize-phrases-buffer, reftex-index-phrases-save-and-return, reftex-index-phrases-mode, reftex-index-next-phrase, reftex-index-this-phrase, reftex-index-all-phrases, reftex-index-region-phrases, reftex-index-phrases-parse-header, reftex-index-phrases-toggle-restricted, reftex-index-new-phrase, reftex-index-find-next-conflict-phrase, reftex-index-phrases-info, reftex-index-phrases-set-macro-key, reftex-index-sort-phrases, reftex-compare-phrase-lines, reftex-index-make-phrase-regexp, reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re, reftex-index-make-replace-string, reftex-query-index-phrase-globally, reftex-query-index-phrase, reftex-index-phrase-match-is-indexed, reftex-index-phrases-fixup-line, reftex-index-phrases-replace-space, reftex-index-select-phrases-macro): New functions. (reftex-index-globalize, reftex-index-globally): functions removed (eval-when-compile (require 'cl)) added. * reftex-toc.el (reftex-toc-mode): Create new indicator for max level. (reftex-toc-max-level-indicator): New variable. (reftex-toc-max-level): New command. (reftex-toc-map): New keybinding `t'. (reftex-toc-help): Constant updated. (eval-when-compile (require 'cl)) added. * reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key can change `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-sel (reftex-insert-docstruct): Respect `reftex-toc-max-level' (eval-when-compile (require 'cl)) added. * reftex-auc.el (eval-when-compile (require 'cl)) added. * reftex-vcr.el (eval-when-compile (require 'cl)) added. * reftex-cite.el (reftex-citep, reftex-citet): New commands. (reftex-citation, reftex-do-citation, reftex-figure-out-cite-format): Additional argument FORMAT-KEY to preselect a citation format. (eval-when-compile (require 'cl)) added. * reftex-parse.el (reftex-context-substring): Optional parameter to-end (reftex-section-info): Deal with environment matches. (eval-when-compile (require 'cl)) added. * reftex-global.el (eval-when-compile (require 'cl)) added.
1999-12-15 17:02:38 +00:00
(defun reftex-citet ()
"Call `reftex-citation' with a format selector `?t'."
(interactive)
(reftex-citation nil ?t))
1999-08-16 07:42:41 +00:00
(defvar reftex-select-bib-map)
(defun reftex-offer-bib-menu ()
"Offer bib menu and return list of selected items."
2002-08-20 10:42:52 +00:00
(let ((bibtype (reftex-bib-or-thebib))
2003-08-11 12:27:02 +00:00
found-list rtn key data selected-entries)
(while
(not
2003-08-11 12:27:02 +00:00
(catch 'done
;; Scan bibtex files
(setq found-list
(cond
((eq bibtype 'bib)
; ((assq 'bib (symbol-value reftex-docstruct-symbol))
;; using BibTeX database files.
(reftex-extract-bib-entries (reftex-get-bibfile-list)))
((eq bibtype 'thebib)
; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
;; using thebibliography environment.
(reftex-extract-bib-entries-from-thebibliography
(reftex-uniquify
(mapcar 'cdr
(reftex-all-assq
2003-08-11 12:27:02 +00:00
'thebib (symbol-value reftex-docstruct-symbol))))))
(reftex-default-bibliography
(message "Using default bibliography")
(reftex-extract-bib-entries (reftex-default-bibliography)))
(t (error "No valid bibliography in this document, and no default available"))))
2003-08-11 12:27:02 +00:00
(unless found-list
(error "Sorry, no matches found"))
2003-08-11 12:27:02 +00:00
;; Remember where we came from
(setq reftex-call-back-to-this-buffer (current-buffer))
(set-marker reftex-select-return-marker (point))
2003-08-11 12:27:02 +00:00
;; Offer selection
(save-window-excursion
(delete-other-windows)
(reftex-kill-buffer "*RefTeX Select*")
(switch-to-buffer-other-window "*RefTeX Select*")
(unless (eq major-mode 'reftex-select-bib-mode)
(reftex-select-bib-mode))
(let ((buffer-read-only nil))
(erase-buffer)
(reftex-insert-bib-matches found-list))
2003-08-11 12:27:02 +00:00
(setq buffer-read-only t)
(if (= 0 (buffer-size))
(error "No matches found"))
(setq truncate-lines t)
(goto-char 1)
(while t
(setq rtn
(reftex-select-item
reftex-citation-prompt
reftex-citation-help
reftex-select-bib-map
nil
'reftex-bibtex-selection-callback nil))
(setq key (car rtn)
data (nth 1 rtn))
(unless key (throw 'done t))
(cond
((eq key ?g)
;; Start over
(throw 'done nil))
((eq key ?r)
;; Restrict with new regular expression
(setq found-list (reftex-restrict-bib-matches found-list))
(let ((buffer-read-only nil))
(erase-buffer)
(reftex-insert-bib-matches found-list))
(goto-char 1))
((eq key ?A)
;; Take all (marked)
(setq selected-entries
2003-08-11 12:27:02 +00:00
(if reftex-select-marked
(mapcar 'car (nreverse reftex-select-marked))
found-list))
(throw 'done t))
((eq key ?a)
;; Take all (marked), and push the symbol 'concat
(setq selected-entries
(cons 'concat
2003-08-11 12:27:02 +00:00
(if reftex-select-marked
(mapcar 'car (nreverse reftex-select-marked))
found-list)))
(throw 'done t))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
((eq key ?e)
;; Take all (marked), and push the symbol 'concat
(reftex-extract-bib-file found-list reftex-select-marked)
(setq selected-entries "BibTeX database file created")
(throw 'done t))
((eq key ?E)
;; Take all (marked), and push the symbol 'concat
(reftex-extract-bib-file found-list reftex-select-marked
'complement)
(setq selected-entries "BibTeX database file created")
(throw 'done t))
2003-08-11 12:27:02 +00:00
((or (eq key ?\C-m)
(eq key 'return))
;; Take selected
(setq selected-entries
2003-08-11 12:27:02 +00:00
(if reftex-select-marked
(cons 'concat
2003-08-11 12:27:02 +00:00
(mapcar 'car (nreverse reftex-select-marked)))
(if data (list data) nil)))
(throw 'done t))
((stringp key)
;; Got this one with completion
(setq selected-entries key)
(throw 'done t))
(t
(ding))))))))
1999-08-16 07:42:41 +00:00
selected-entries))
(defun reftex-restrict-bib-matches (found-list)
"Limit FOUND-LIST with more regular expressions."
1999-08-16 07:42:41 +00:00
(let ((re-list (split-string (read-string
2003-08-11 12:27:02 +00:00
"RegExp [ && RegExp...]: "
nil 'reftex-cite-regexp-hist)
"[ \t]*&&[ \t]*"))
(found-list-r found-list)
re)
1999-08-16 07:42:41 +00:00
(while (setq re (pop re-list))
(setq found-list-r
2003-08-11 12:27:02 +00:00
(delq nil
(mapcar
(lambda (x)
(if (string-match
re (cdr (assoc "&entry" x)))
x
nil))
found-list-r))))
1999-08-16 07:42:41 +00:00
(if found-list-r
2003-08-11 12:27:02 +00:00
found-list-r
1999-08-16 07:42:41 +00:00
(ding)
found-list)))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(defun reftex-extract-bib-file (all &optional marked complement)
"Limit FOUND-LIST with more regular expressions."
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(let ((file (read-file-name "File to create: ")))
(find-file-other-window file)
(if (> (buffer-size) 0)
(unless (yes-or-no-p
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(format "Overwrite non-empty file %s? " file))
(error "Abort")))
(erase-buffer)
(setq all (delq nil
(mapcar
(lambda (x)
(if marked
(if (or (and (assoc x marked) (not complement))
(and (not (assoc x marked)) complement))
(cdr (assoc "&entry" x))
nil)
(cdr (assoc "&entry" x))))
all)))
(insert (mapconcat 'identity all "\n\n"))
(save-buffer)
(goto-char (point-min))))
1999-08-16 07:42:41 +00:00
(defun reftex-insert-bib-matches (list)
"Insert the bib matches and number them correctly."
1999-08-16 07:42:41 +00:00
(let ((mouse-face
2003-08-11 12:27:02 +00:00
(if (memq reftex-highlight-selection '(mouse both))
reftex-mouse-selected-face
nil))
tmp len)
(mapc
1999-08-16 07:42:41 +00:00
(lambda (x)
(setq tmp (cdr (assoc "&formatted" x))
2003-08-11 12:27:02 +00:00
len (length tmp))
1999-08-16 07:42:41 +00:00
(put-text-property 0 len :data x tmp)
(put-text-property 0 (1- len) 'mouse-face mouse-face tmp)
(insert tmp))
list))
(run-hooks 'reftex-display-copied-context-hook))
(defun reftex-format-names (namelist n)
(let (last (len (length namelist)))
2002-07-22 10:38:32 +00:00
(if (= n 0) (setq n len))
1999-08-16 07:42:41 +00:00
(cond
((< len 1) "")
((= 1 len) (car namelist))
((> len n) (concat (car namelist) (nth 2 reftex-cite-punctuation)))
(t
(setq n (min len n)
last (nth (1- n) namelist))
(setcdr (nthcdr (- n 2) namelist) nil)
(concat
(mapconcat 'identity namelist (nth 0 reftex-cite-punctuation))
(nth 1 reftex-cite-punctuation)
last)))))
(defun reftex-format-citation (entry format)
"Format a citation from the info in the BibTeX ENTRY according to FORMAT."
1999-08-16 07:42:41 +00:00
(unless (stringp format) (setq format "\\cite{%l}"))
(if (and reftex-comment-citations
(string-match "%l" reftex-cite-comment-format))
(error "reftex-cite-comment-format contains invalid %%l"))
1999-08-16 07:42:41 +00:00
(while (string-match
"\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)"
format)
(let ((n (string-to-number (match-string 4 format)))
1999-08-16 07:42:41 +00:00
(l (string-to-char (match-string 5 format)))
rpl b e)
(save-match-data
(setq rpl
(cond
((= l ?l) (concat
(reftex-get-bib-field "&key" entry)
(if reftex-comment-citations
reftex-cite-comment-format
"")))
((= l ?a) (reftex-format-names
(reftex-get-bib-names "author" entry)
(or n 2)))
((= l ?A) (car (reftex-get-bib-names "author" entry)))
((= l ?b) (reftex-get-bib-field "booktitle" entry "in: %s"))
((= l ?B) (reftex-abbreviate-title
2003-08-11 12:27:02 +00:00
(reftex-get-bib-field "booktitle" entry "in: %s")))
1999-08-16 07:42:41 +00:00
((= l ?c) (reftex-get-bib-field "chapter" entry))
((= l ?d) (reftex-get-bib-field "edition" entry))
((= l ?e) (reftex-format-names
(reftex-get-bib-names "editor" entry)
(or n 2)))
((= l ?E) (car (reftex-get-bib-names "editor" entry)))
((= l ?h) (reftex-get-bib-field "howpublished" entry))
((= l ?i) (reftex-get-bib-field "institution" entry))
((= l ?j) (reftex-get-bib-field "journal" entry))
((= l ?k) (reftex-get-bib-field "key" entry))
((= l ?m) (reftex-get-bib-field "month" entry))
((= l ?n) (reftex-get-bib-field "number" entry))
((= l ?N) (reftex-get-bib-field "note" entry))
1999-08-16 07:42:41 +00:00
((= l ?o) (reftex-get-bib-field "organization" entry))
((= l ?p) (reftex-get-bib-field "pages" entry))
((= l ?P) (car (split-string
(reftex-get-bib-field "pages" entry)
"[- .]+")))
((= l ?s) (reftex-get-bib-field "school" entry))
((= l ?u) (reftex-get-bib-field "publisher" entry))
((= l ?U) (reftex-get-bib-field "url" entry))
1999-08-16 07:42:41 +00:00
((= l ?r) (reftex-get-bib-field "address" entry))
((= l ?t) (reftex-get-bib-field "title" entry))
((= l ?T) (reftex-abbreviate-title
2003-08-11 12:27:02 +00:00
(reftex-get-bib-field "title" entry)))
1999-08-16 07:42:41 +00:00
((= l ?v) (reftex-get-bib-field "volume" entry))
((= l ?y) (reftex-get-bib-field "year" entry)))))
(if (string= rpl "")
(setq b (match-beginning 2) e (match-end 2))
(setq b (match-beginning 3) e (match-end 3)))
(setq format (concat (substring format 0 b) rpl (substring format e)))))
(while (string-match "%%" format)
(setq format (replace-match "%" t t format)))
(while (string-match "[ ,.;:]*%<" format)
(setq format (replace-match "" t t format)))
format)
;;;###autoload
1999-08-16 07:42:41 +00:00
(defun reftex-make-cite-echo-string (entry docstruct-symbol)
"Format a bibtex ENTRY for the echo area and cache the result."
1999-08-16 07:42:41 +00:00
(let* ((key (reftex-get-bib-field "&key" entry))
(string
2003-08-11 12:27:02 +00:00
(let* ((reftex-cite-punctuation '(" " " & " " etal.")))
(reftex-format-citation entry reftex-cite-view-format)))
(cache (assq 'bibview-cache (symbol-value docstruct-symbol)))
(cache-entry (assoc key (cdr cache))))
1999-08-16 07:42:41 +00:00
(unless cache
;; This docstruct has no cache - make one.
(set docstruct-symbol (cons (cons 'bibview-cache nil)
2003-08-11 12:27:02 +00:00
(symbol-value docstruct-symbol))))
1999-08-16 07:42:41 +00:00
(when reftex-cache-cite-echo
(setq key (copy-sequence key))
(set-text-properties 0 (length key) nil key)
(set-text-properties 0 (length string) nil string)
(if cache-entry
2003-08-11 12:27:02 +00:00
(unless (string= (cdr cache-entry) string)
(setcdr cache-entry string)
(put reftex-docstruct-symbol 'modified t))
(push (cons key string) (cdr cache))
(put reftex-docstruct-symbol 'modified t)))
1999-08-16 07:42:41 +00:00
string))
(defun reftex-bibtex-selection-callback (data ignore no-revisit)
"Callback function to be called from the BibTeX selection, in
order to display context. This function is relatively slow and not
recommended for follow mode. It works OK for individual lookups."
1999-08-16 07:42:41 +00:00
(let ((win (selected-window))
(key (reftex-get-bib-field "&key" data))
2002-08-20 10:42:52 +00:00
bibfile-list item bibtype)
1999-08-16 07:42:41 +00:00
(catch 'exit
* textmodes/two-column.el (2C-split): * textmodes/texnfo-upd.el (texinfo-multi-file-included-list): * textmodes/tex-mode.el (tex-set-buffer-directory): * textmodes/spell.el (spell-region, spell-string): * textmodes/reftex.el (reftex-erase-buffer): (reftex-get-file-buffer-force, reftex-kill-temporary-buffers): * textmodes/reftex-toc.el (reftex-toc-promote-action): * textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct) (reftex-select-item): * textmodes/reftex-ref.el (reftex-label-info-update) (reftex-offer-label-menu): * textmodes/reftex-index.el (reftex-index-change-entry) (reftex-index-phrases-info): * textmodes/reftex-global.el (reftex-create-tags-file) (reftex-save-all-document-buffers, reftex-ensure-write-access): * textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite) (reftex-view-crossref-from-bibtex): * textmodes/reftex-cite.el (reftex-bibtex-selection-callback) (reftex-extract-bib-entries-from-thebibliography) (reftex-all-used-citation-keys, reftex-create-bibtex-file): * textmodes/refbib.el (r2b-capitalize-title): (r2b-convert-buffer, r2b-help): * textmodes/page-ext.el (pages-directory) (pages-directory-goto-with-mouse): * textmodes/bibtex.el (bibtex-validate-globally): * textmodes/bib-mode.el (bib-capitalize-title): * textmodes/artist.el (artist-clear-buffer, artist-system): * progmodes/xscheme.el (global-set-scheme-interaction-buffer): (local-set-scheme-interaction-buffer, xscheme-process-filter) (verify-xscheme-buffer, xscheme-enter-interaction-mode) (xscheme-enter-debugger-mode, xscheme-debugger-mode-p) (xscheme-send-control-g-interrupt, xscheme-start-process) (xscheme-process-sentinel, xscheme-cd): * progmodes/verilog-mode.el (verilog-read-always-signals) (verilog-set-define, verilog-getopt-file) (verilog-module-inside-filename-p): * progmodes/sh-script.el: * progmodes/python.el (python-pdbtrack-get-source-buffer) (python-pdbtrack-grub-for-buffer, python-execute-file): * progmodes/octave-inf.el (inferior-octave): * progmodes/idlwave.el (idlwave-scan-user-lib-files) (idlwave-shell-compile-helper-routines, idlwave-set-local) (idlwave-display-completion-list-xemacs, idlwave-list-abbrevs) (idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows) (idlwave-completion-fontify-classes, idlwave-display-calling-sequence): * progmodes/idlw-shell.el (idlwave-shell-examine-display-clear) (idlwave-shell-filter, idlwave-shell-examine-highlight) (idlwave-shell-sentinel, idlwave-shell-filter-directory) (idlwave-shell-display-line, idlwave-shell-set-bp-in-module) (idlwave-shell-examine-display, idlwave-shell-run-region) (idlwave-shell-filter-bp, idlwave-shell-save-and-action) (idlwave-shell-sources-filter, idlwave-shell-goto-next-error): * progmodes/idlw-help.el (idlwave-help-get-special-help) (idlwave-help-get-help-buffer): * progmodes/gud.el (gud-basic-call, gud-find-class) (gud-tooltip-activate-mouse-motions-if-enabled): * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): * progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as) (ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file) (ebrowse-tags-next-file): * progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps) (ebnf-eps-production-list, ebnf-begin-file, ebnf-log) (ebnf-eps-finish-and-write): * progmodes/cpp.el (cpp-edit-save): * progmodes/cperl-mode.el (cperl-pod-to-manpage): * progmodes/cc-defs.el (c-emacs-features): * progmodes/antlr-mode.el (antlr-invalidate-context-cache) (antlr-directory-dependencies): * progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name) (ada-run-application, ada-find-in-src-path, ada-goto-parent) (ada-find-any-references, ada-make-filename-from-adaname) (ada-make-body-gnatstub): * obsolete/rnews.el (news-list-news-groups): * obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file): * obsolete/iso-acc.el (iso-acc-minibuf-setup): * net/rcirc.el (rcirc-debug): * net/newst-treeview.el (newsticker--treeview-list-add-item) (newsticker--treeview-list-clear, newsticker-treeview-browse-url) (newsticker--treeview-list-update-faces, newsticker-treeview-save) (newsticker--treeview-item-show-text, newsticker--treeview-item-show) (newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init) (newsticker-treeview-show-item, newsticker--treeview-unfold-node) (newsticker--treeview-list-clear-highlight) (newsticker--treeview-list-update-highlight) (newsticker--treeview-list-highlight-start) (newsticker--treeview-tree-update-highlight) (newsticker--treeview-get-selected-item) (newsticker-treeview-mark-list-items-old) (newsticker--treeview-set-current-node): * net/newst-plainview.el (newsticker--buffer-set-uptodate): * net/newst-backend.el (newsticker--get-news-by-funcall) (newsticker--get-news-by-wget, newsticker--image-get) (newsticker--image-sentinel): * net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field): * net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session): (eudc-ph-close-session): * net/eudc.el (eudc-save-options): * language/thai-word.el (thai-update-word-table): * language/japan-util.el (japanese-string-conversion): * international/titdic-cnv.el (tsang-quick-converter) (ziranma-converter, ctlau-converter): * international/mule-cmds.el (describe-language-environment): * international/ja-dic-cnv.el (skkdic-convert-okuri-ari) (skkdic-convert-postfix, skkdic-convert-prefix): (skkdic-convert-okuri-nasi, skkdic-convert): * emacs-lisp/re-builder.el (reb-update-overlays): * emacs-lisp/pp.el (pp-to-string, pp-display-expression): * emacs-lisp/gulp.el (gulp-send-requests): * emacs-lisp/find-gc.el (trace-call-tree): * emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class) (eieio-describe-generic): * emacs-lisp/eieio-base.el (eieio-persistent-read): * emacs-lisp/edebug.el (edebug-outside-excursion): * emacs-lisp/debug.el (debugger-make-xrefs): * emacs-lisp/cust-print.el (custom-prin1-to-string): * emacs-lisp/chart.el (chart-new-buffer): * emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log): Use with-current-buffer. * textmodes/artist.el (artist-system): Don't call copy-sequence on a fresh string. * progmodes/idlw-shell.el (easymenu setup): Use dolist.
2009-10-31 02:38:34 +00:00
(with-current-buffer reftex-call-back-to-this-buffer
2003-08-11 12:27:02 +00:00
(setq bibtype (reftex-bib-or-thebib))
(cond
((eq bibtype 'bib)
; ((assq 'bib (symbol-value reftex-docstruct-symbol))
(setq bibfile-list (reftex-get-bibfile-list)))
((eq bibtype 'thebib)
; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
(setq bibfile-list
(reftex-uniquify
(mapcar 'cdr
(reftex-all-assq
2003-08-11 12:27:02 +00:00
'thebib (symbol-value reftex-docstruct-symbol))))
item t))
(reftex-default-bibliography
(setq bibfile-list (reftex-default-bibliography)))
(t (ding) (throw 'exit nil))))
1999-08-16 07:42:41 +00:00
(when no-revisit
2003-08-11 12:27:02 +00:00
(setq bibfile-list (reftex-visited-files bibfile-list)))
1999-08-16 07:42:41 +00:00
(condition-case nil
(reftex-pop-to-bibtex-entry
2003-08-11 12:27:02 +00:00
key bibfile-list (not reftex-keep-temporary-buffers) t item)
(error (ding))))
1999-08-16 07:42:41 +00:00
(select-window win)))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
;;; Global BibTeX file
(defun reftex-all-used-citation-keys ()
(reftex-access-scan-info)
(let ((files (reftex-all-document-files)) file keys kk k)
* textmodes/two-column.el (2C-split): * textmodes/texnfo-upd.el (texinfo-multi-file-included-list): * textmodes/tex-mode.el (tex-set-buffer-directory): * textmodes/spell.el (spell-region, spell-string): * textmodes/reftex.el (reftex-erase-buffer): (reftex-get-file-buffer-force, reftex-kill-temporary-buffers): * textmodes/reftex-toc.el (reftex-toc-promote-action): * textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct) (reftex-select-item): * textmodes/reftex-ref.el (reftex-label-info-update) (reftex-offer-label-menu): * textmodes/reftex-index.el (reftex-index-change-entry) (reftex-index-phrases-info): * textmodes/reftex-global.el (reftex-create-tags-file) (reftex-save-all-document-buffers, reftex-ensure-write-access): * textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite) (reftex-view-crossref-from-bibtex): * textmodes/reftex-cite.el (reftex-bibtex-selection-callback) (reftex-extract-bib-entries-from-thebibliography) (reftex-all-used-citation-keys, reftex-create-bibtex-file): * textmodes/refbib.el (r2b-capitalize-title): (r2b-convert-buffer, r2b-help): * textmodes/page-ext.el (pages-directory) (pages-directory-goto-with-mouse): * textmodes/bibtex.el (bibtex-validate-globally): * textmodes/bib-mode.el (bib-capitalize-title): * textmodes/artist.el (artist-clear-buffer, artist-system): * progmodes/xscheme.el (global-set-scheme-interaction-buffer): (local-set-scheme-interaction-buffer, xscheme-process-filter) (verify-xscheme-buffer, xscheme-enter-interaction-mode) (xscheme-enter-debugger-mode, xscheme-debugger-mode-p) (xscheme-send-control-g-interrupt, xscheme-start-process) (xscheme-process-sentinel, xscheme-cd): * progmodes/verilog-mode.el (verilog-read-always-signals) (verilog-set-define, verilog-getopt-file) (verilog-module-inside-filename-p): * progmodes/sh-script.el: * progmodes/python.el (python-pdbtrack-get-source-buffer) (python-pdbtrack-grub-for-buffer, python-execute-file): * progmodes/octave-inf.el (inferior-octave): * progmodes/idlwave.el (idlwave-scan-user-lib-files) (idlwave-shell-compile-helper-routines, idlwave-set-local) (idlwave-display-completion-list-xemacs, idlwave-list-abbrevs) (idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows) (idlwave-completion-fontify-classes, idlwave-display-calling-sequence): * progmodes/idlw-shell.el (idlwave-shell-examine-display-clear) (idlwave-shell-filter, idlwave-shell-examine-highlight) (idlwave-shell-sentinel, idlwave-shell-filter-directory) (idlwave-shell-display-line, idlwave-shell-set-bp-in-module) (idlwave-shell-examine-display, idlwave-shell-run-region) (idlwave-shell-filter-bp, idlwave-shell-save-and-action) (idlwave-shell-sources-filter, idlwave-shell-goto-next-error): * progmodes/idlw-help.el (idlwave-help-get-special-help) (idlwave-help-get-help-buffer): * progmodes/gud.el (gud-basic-call, gud-find-class) (gud-tooltip-activate-mouse-motions-if-enabled): * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): * progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as) (ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file) (ebrowse-tags-next-file): * progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps) (ebnf-eps-production-list, ebnf-begin-file, ebnf-log) (ebnf-eps-finish-and-write): * progmodes/cpp.el (cpp-edit-save): * progmodes/cperl-mode.el (cperl-pod-to-manpage): * progmodes/cc-defs.el (c-emacs-features): * progmodes/antlr-mode.el (antlr-invalidate-context-cache) (antlr-directory-dependencies): * progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name) (ada-run-application, ada-find-in-src-path, ada-goto-parent) (ada-find-any-references, ada-make-filename-from-adaname) (ada-make-body-gnatstub): * obsolete/rnews.el (news-list-news-groups): * obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file): * obsolete/iso-acc.el (iso-acc-minibuf-setup): * net/rcirc.el (rcirc-debug): * net/newst-treeview.el (newsticker--treeview-list-add-item) (newsticker--treeview-list-clear, newsticker-treeview-browse-url) (newsticker--treeview-list-update-faces, newsticker-treeview-save) (newsticker--treeview-item-show-text, newsticker--treeview-item-show) (newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init) (newsticker-treeview-show-item, newsticker--treeview-unfold-node) (newsticker--treeview-list-clear-highlight) (newsticker--treeview-list-update-highlight) (newsticker--treeview-list-highlight-start) (newsticker--treeview-tree-update-highlight) (newsticker--treeview-get-selected-item) (newsticker-treeview-mark-list-items-old) (newsticker--treeview-set-current-node): * net/newst-plainview.el (newsticker--buffer-set-uptodate): * net/newst-backend.el (newsticker--get-news-by-funcall) (newsticker--get-news-by-wget, newsticker--image-get) (newsticker--image-sentinel): * net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field): * net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session): (eudc-ph-close-session): * net/eudc.el (eudc-save-options): * language/thai-word.el (thai-update-word-table): * language/japan-util.el (japanese-string-conversion): * international/titdic-cnv.el (tsang-quick-converter) (ziranma-converter, ctlau-converter): * international/mule-cmds.el (describe-language-environment): * international/ja-dic-cnv.el (skkdic-convert-okuri-ari) (skkdic-convert-postfix, skkdic-convert-prefix): (skkdic-convert-okuri-nasi, skkdic-convert): * emacs-lisp/re-builder.el (reb-update-overlays): * emacs-lisp/pp.el (pp-to-string, pp-display-expression): * emacs-lisp/gulp.el (gulp-send-requests): * emacs-lisp/find-gc.el (trace-call-tree): * emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class) (eieio-describe-generic): * emacs-lisp/eieio-base.el (eieio-persistent-read): * emacs-lisp/edebug.el (edebug-outside-excursion): * emacs-lisp/debug.el (debugger-make-xrefs): * emacs-lisp/cust-print.el (custom-prin1-to-string): * emacs-lisp/chart.el (chart-new-buffer): * emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log): Use with-current-buffer. * textmodes/artist.el (artist-system): Don't call copy-sequence on a fresh string. * progmodes/idlw-shell.el (easymenu setup): Use dolist.
2009-10-31 02:38:34 +00:00
(save-current-buffer
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(while (setq file (pop files))
(set-buffer (reftex-get-file-buffer-force file 'mark))
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward "\\(?:^\\|\\=\\)[^%\n\r]*?\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}" nil t)
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(setq kk (match-string-no-properties 3))
(while (string-match "%.*\n?" kk)
(setq kk (replace-match "" t t kk)))
(setq kk (split-string kk "[, \t\r\n]+"))
(while (setq k (pop kk))
(or (member k keys)
(setq keys (cons k keys)))))))))
(reftex-kill-temporary-buffers)
keys))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(defun reftex-get-string-refs (alist)
"Return a list of BibTeX @string references that appear as values in ALIST."
(reftex-remove-if (lambda (x) (string-match "^\\([\"{]\\|[0-9]+$\\)" x))
;; get list of values, discard keys
(mapcar 'cdr
;; remove &key and &type entries
(reftex-remove-if (lambda (pair)
(string-match "^&" (car pair)))
alist))))
;;;###autoload
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(defun reftex-create-bibtex-file (bibfile)
"Create a new BibTeX database BIBFILE with all entries referenced in document.
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
The command prompts for a filename and writes the collected
entries to that file. Only entries referenced in the current
document with any \\cite-like macros are used. The sequence in
the new file is the same as it was in the old database.
Entries referenced from other entries must appear after all
referencing entries.
You can define strings to be used as header or footer for the
created files in the variables `reftex-create-bibtex-header' or
`reftex-create-bibtex-footer' respectively."
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(interactive "FNew BibTeX file: ")
(let ((keys (reftex-all-used-citation-keys))
(files (reftex-get-bibfile-list))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
file key entries beg end entry string-keys string-entries)
* textmodes/two-column.el (2C-split): * textmodes/texnfo-upd.el (texinfo-multi-file-included-list): * textmodes/tex-mode.el (tex-set-buffer-directory): * textmodes/spell.el (spell-region, spell-string): * textmodes/reftex.el (reftex-erase-buffer): (reftex-get-file-buffer-force, reftex-kill-temporary-buffers): * textmodes/reftex-toc.el (reftex-toc-promote-action): * textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct) (reftex-select-item): * textmodes/reftex-ref.el (reftex-label-info-update) (reftex-offer-label-menu): * textmodes/reftex-index.el (reftex-index-change-entry) (reftex-index-phrases-info): * textmodes/reftex-global.el (reftex-create-tags-file) (reftex-save-all-document-buffers, reftex-ensure-write-access): * textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite) (reftex-view-crossref-from-bibtex): * textmodes/reftex-cite.el (reftex-bibtex-selection-callback) (reftex-extract-bib-entries-from-thebibliography) (reftex-all-used-citation-keys, reftex-create-bibtex-file): * textmodes/refbib.el (r2b-capitalize-title): (r2b-convert-buffer, r2b-help): * textmodes/page-ext.el (pages-directory) (pages-directory-goto-with-mouse): * textmodes/bibtex.el (bibtex-validate-globally): * textmodes/bib-mode.el (bib-capitalize-title): * textmodes/artist.el (artist-clear-buffer, artist-system): * progmodes/xscheme.el (global-set-scheme-interaction-buffer): (local-set-scheme-interaction-buffer, xscheme-process-filter) (verify-xscheme-buffer, xscheme-enter-interaction-mode) (xscheme-enter-debugger-mode, xscheme-debugger-mode-p) (xscheme-send-control-g-interrupt, xscheme-start-process) (xscheme-process-sentinel, xscheme-cd): * progmodes/verilog-mode.el (verilog-read-always-signals) (verilog-set-define, verilog-getopt-file) (verilog-module-inside-filename-p): * progmodes/sh-script.el: * progmodes/python.el (python-pdbtrack-get-source-buffer) (python-pdbtrack-grub-for-buffer, python-execute-file): * progmodes/octave-inf.el (inferior-octave): * progmodes/idlwave.el (idlwave-scan-user-lib-files) (idlwave-shell-compile-helper-routines, idlwave-set-local) (idlwave-display-completion-list-xemacs, idlwave-list-abbrevs) (idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows) (idlwave-completion-fontify-classes, idlwave-display-calling-sequence): * progmodes/idlw-shell.el (idlwave-shell-examine-display-clear) (idlwave-shell-filter, idlwave-shell-examine-highlight) (idlwave-shell-sentinel, idlwave-shell-filter-directory) (idlwave-shell-display-line, idlwave-shell-set-bp-in-module) (idlwave-shell-examine-display, idlwave-shell-run-region) (idlwave-shell-filter-bp, idlwave-shell-save-and-action) (idlwave-shell-sources-filter, idlwave-shell-goto-next-error): * progmodes/idlw-help.el (idlwave-help-get-special-help) (idlwave-help-get-help-buffer): * progmodes/gud.el (gud-basic-call, gud-find-class) (gud-tooltip-activate-mouse-motions-if-enabled): * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): * progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as) (ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file) (ebrowse-tags-next-file): * progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps) (ebnf-eps-production-list, ebnf-begin-file, ebnf-log) (ebnf-eps-finish-and-write): * progmodes/cpp.el (cpp-edit-save): * progmodes/cperl-mode.el (cperl-pod-to-manpage): * progmodes/cc-defs.el (c-emacs-features): * progmodes/antlr-mode.el (antlr-invalidate-context-cache) (antlr-directory-dependencies): * progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name) (ada-run-application, ada-find-in-src-path, ada-goto-parent) (ada-find-any-references, ada-make-filename-from-adaname) (ada-make-body-gnatstub): * obsolete/rnews.el (news-list-news-groups): * obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file): * obsolete/iso-acc.el (iso-acc-minibuf-setup): * net/rcirc.el (rcirc-debug): * net/newst-treeview.el (newsticker--treeview-list-add-item) (newsticker--treeview-list-clear, newsticker-treeview-browse-url) (newsticker--treeview-list-update-faces, newsticker-treeview-save) (newsticker--treeview-item-show-text, newsticker--treeview-item-show) (newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init) (newsticker-treeview-show-item, newsticker--treeview-unfold-node) (newsticker--treeview-list-clear-highlight) (newsticker--treeview-list-update-highlight) (newsticker--treeview-list-highlight-start) (newsticker--treeview-tree-update-highlight) (newsticker--treeview-get-selected-item) (newsticker-treeview-mark-list-items-old) (newsticker--treeview-set-current-node): * net/newst-plainview.el (newsticker--buffer-set-uptodate): * net/newst-backend.el (newsticker--get-news-by-funcall) (newsticker--get-news-by-wget, newsticker--image-get) (newsticker--image-sentinel): * net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field): * net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session): (eudc-ph-close-session): * net/eudc.el (eudc-save-options): * language/thai-word.el (thai-update-word-table): * language/japan-util.el (japanese-string-conversion): * international/titdic-cnv.el (tsang-quick-converter) (ziranma-converter, ctlau-converter): * international/mule-cmds.el (describe-language-environment): * international/ja-dic-cnv.el (skkdic-convert-okuri-ari) (skkdic-convert-postfix, skkdic-convert-prefix): (skkdic-convert-okuri-nasi, skkdic-convert): * emacs-lisp/re-builder.el (reb-update-overlays): * emacs-lisp/pp.el (pp-to-string, pp-display-expression): * emacs-lisp/gulp.el (gulp-send-requests): * emacs-lisp/find-gc.el (trace-call-tree): * emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class) (eieio-describe-generic): * emacs-lisp/eieio-base.el (eieio-persistent-read): * emacs-lisp/edebug.el (edebug-outside-excursion): * emacs-lisp/debug.el (debugger-make-xrefs): * emacs-lisp/cust-print.el (custom-prin1-to-string): * emacs-lisp/chart.el (chart-new-buffer): * emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log): Use with-current-buffer. * textmodes/artist.el (artist-system): Don't call copy-sequence on a fresh string. * progmodes/idlw-shell.el (easymenu setup): Use dolist.
2009-10-31 02:38:34 +00:00
(save-current-buffer
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(dolist (file files)
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(set-buffer (reftex-get-file-buffer-force file 'mark))
(reftex-with-special-syntax-for-bib
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward "^[ \t]*@\\(?:\\w\\|\\s_\\)+[ \t\n\r]*\
[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t)
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(setq key (match-string 1)
beg (match-beginning 0)
end (progn
(goto-char (match-beginning 1))
(condition-case nil
(up-list 1)
(error (goto-char (match-end 0))))
(point)))
(when (member key keys)
(setq entry (buffer-substring beg end)
entries (cons entry entries)
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
keys (delete key keys))
;; check for crossref entries
(let* ((attr-list (reftex-parse-bibtex-entry nil beg end))
(xref-key (cdr (assoc "crossref" attr-list))))
Port RefTeX to cl-lib * lisp/textmodes/reftex-auc.el: * lisp/textmodes/reftex-cite.el: Use cl-lib. (reftex-do-citation, reftex-create-bibtex-file): Substitute cl-lib macros. * lisp/textmodes/reftex-dcr.el: Use cl-lib. (reftex-view-regexp-match): Substitute cl-lib macro. * lisp/textmodes/reftex-global.el: Use cl-lib. (reftex-find-duplicate-labels, reftex-renumber-simple-labels): (reftex-translate): Substitute cl-lib macros. * lisp/textmodes/reftex-index.el: Use cl-lib. (reftex-index, reftex-index-select-tag, reftex-index-mode-map): (reftex-index-next-phrase, reftex-index-phrases-info): (reftex-query-index-phrase): Substitute cl-lib macros. * lisp/textmodes/reftex-parse.el: Use cl-lib. (reftex-parse-from-file, reftex-where-am-I, reftex-what-macro): (reftex-nth-arg, reftex-init-section-numbers, reftex-section-number): Substitute cl-lib macros. * lisp/textmodes/reftex-ref.el: Use cl-lib. (reftex-uniquify-label, reftex-offer-label-menu): Substitute cl-lib macros. * lisp/textmodes/reftex-sel.el: Use cl-lib. (reftex-select-shared-map): Set keymap parent to special-mode-map. Flatten loop and remove digits and hyphen definitions from the map. (reftex-select-label-mode-map): (reftex-select-bib-mode-map): Use cl-lib macro, and flatten other loop. (reftex-insert-docstruct, reftex-select-unmark): Use cl-lib macros. * lisp/textmodes/reftex-vars.el (reftex-vref-is-default): Use cl-pushnew. * lisp/textmodes/reftex.el: Use cl-lib. (reftex-docstruct-symbol): Use cl-incf. (reftex-ref-style-toggle): Replace add-to-list with append. (reftex-compile-variables): Use cl-lib macros, and functions with compiler macros. cl-first is just an alias. (reftex-parse-args, reftex-scanning-info-available-p): (reftex-select-external-document, reftex-get-file-buffer-force): Use cl-lib macros. (reftex-isearch-minor-mode): Replace add-to-list with append.
2016-11-19 18:34:24 +00:00
(if xref-key (cl-pushnew xref-key keys)))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
;; check for string references
(let* ((raw-fields (reftex-parse-bibtex-entry nil beg end t))
(string-fields (reftex-get-string-refs raw-fields)))
(dolist (skey string-fields)
(unless (member skey string-keys)
(push skey string-keys)))))))))))
;; second pass: grab @string references
(if string-keys
(save-current-buffer
(dolist (file files)
(set-buffer (reftex-get-file-buffer-force file 'mark))
(reftex-with-special-syntax-for-bib
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward
"^[ \t]*@[Ss][Tt][Rr][Ii][Nn][Gg][ \t]*{[ \t]*\\([^ \t\r\n]+\\)"
nil t)
(setq key (match-string 1)
beg (match-beginning 0)
end (progn
(goto-char (match-beginning 1))
(condition-case nil
(up-list 1)
(error (goto-char (match-end 0))))
(point)))
(when (member key string-keys)
(setq entry (buffer-substring beg end)
string-entries (cons entry string-entries)
string-keys (delete key string-keys))))))))))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(find-file-other-window bibfile)
(if (> (buffer-size) 0)
(unless (yes-or-no-p
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(format "Overwrite non-empty file %s? " bibfile))
(error "Abort")))
(erase-buffer)
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(if reftex-create-bibtex-header (insert reftex-create-bibtex-header "\n\n"))
(insert (mapconcat 'identity (reverse string-entries) "\n\n"))
(if string-entries (insert "\n\n\n"))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(insert (mapconcat 'identity (reverse entries) "\n\n"))
Merge from standalone RefTeX repository. Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
2012-09-30 20:30:13 +00:00
(if reftex-create-bibtex-footer (insert "\n\n" reftex-create-bibtex-footer))
2005-01-14 Carsten Dominik <dominik@science.uva.nl> * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist
2005-01-14 10:12:03 +00:00
(goto-char (point-min))
(save-buffer)
(message "%d entries extracted and copied to new database"
(length entries))))
(provide 'reftex-cite)
1999-08-16 07:42:41 +00:00
;;; reftex-cite.el ends here
;; Local Variables:
;; generated-autoload-file: "reftex-loaddefs.el"
;; End: