Commits

dominik  committed 01d490d

reftex 4.14

  • Participants
  • Parent commits ad0b419

Comments (0)

Files changed (16)

 Here are the more important changes made to RefTeX since initial release.
 Minor bug fixes are not mentioned.
 
+Version 4.14
+   - Ensure write access to all files before doing global label replace.
+   - Fixed bug which would parse \partial as \part.
+
+Version 4.12
+   - Support for `bibentry' citation package.
+
 Version 4.11
    - Fixed bug which would parse \Section as \section.
 
+2000-06-20  Carsten Dominik  <dominik@astro.uva.nl>
+
+	* reftex 4.14.
+
 2000-02-04  Carsten Dominik  <dominik@astro.uva.nl>
 
 	* reftex 4.11.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.18
-AUTHOR_VERSION = 4.11
+AUTHOR_VERSION = 4.14
 MAINTAINER = Carsten Dominik <dominik@astro.uva.nl>
 PACKAGE = reftex
 PKG_TYPE = regular
-This is the README file of the RefTeX distribution, version 4.11 
+This is the README file of the RefTeX distribution, version 4.14 
 
 Your kit should contain the following files:
 

File reftex-auc.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-cite.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-dcr.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.
     (setq reftex-call-back-to-this-buffer (current-buffer))
 
     (cond
-     ((string-match "\\`\\\\cite\\|cite\\*?\\'" macro)
+     ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro)
       ;; A citation macro: search for bibitems or BibTeX entries
       (setq dw (reftex-view-cr-cite arg key auto-how)))
      ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro)
       (reftex-access-scan-info arg)
       (setq dw (reftex-view-regexp-match
 		(format reftex-find-citation-regexp-format (regexp-quote key))
-		3 nil nil)))
+		4 nil nil)))
      ((member macro reftex-macros-with-index)
       (reftex-access-scan-info arg)
       (setq dw (reftex-view-regexp-match
        ;; FIXME: Can fail with backslash in comment
        (save-excursion  
 	 (search-backward "\\" nil t)
-	 (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\)"))
+	 (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)"))
 
        (condition-case nil
 	   (let ((current-prefix-arg nil))
   (interactive "P")
   (when arg 
     ;; Break connection to reference buffer
-    (remprop 'reftex-bibtex-view-cite-locations :ref-buffer))
+    (put 'reftex-bibtex-view-cite-locations :ref-buffer nil))
   (let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer)))
     ;; Establish connection to reference buffer
     (unless ref-buffer
 	  (reftex-view-regexp-match
 	   (format reftex-find-citation-regexp-format
 		   (regexp-quote (match-string 1)))
-	   3 arg ref-buffer))
+	   4 arg ref-buffer))
       (error "Cannot find citation key in BibTeX entry"))))
 
 (defun reftex-view-regexp-match (re &optional highlight-group new ref-buffer)
 			    (match-end highlight-group))
 	  (add-hook 'pre-command-hook 'reftex-highlight-shall-die)
 	  (setq pop-window (selected-window)))
-      (remprop 'reftex-view-regexp-match :props)
+      (put 'reftex-view-regexp-match :props nil)
       (or cont (set-window-configuration window-conf)))
     (select-window current-window)
     (if match

File reftex-global.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.
     (unless changed-sequence
       (error "Simple labels are already in correct sequence"))
 
+    (reftex-ensure-write-access (reftex-all-document-files))
+
     ;; Save all document buffers before this operation
     (reftex-save-all-document-buffers)
 
 	  (set-buffer buffer)
 	  (save-buffer))))))
 
+(defun reftex-ensure-write-access (files)
+  "Make sure we have write access to all files in FILES.
+Also checks if buffers visiting the files are in read-only mode."
+  (let (file buf)
+    (while (setq file (pop files))
+      (unless (file-exists-p file)
+	(ding)
+	(or (y-or-n-p (format "No such file %s. Continue? " file))
+	    (error "Abort")))
+      (unless (file-writable-p file)
+	(ding)
+	(or (y-or-n-p (format "No write access to %s. Continue? " file))
+	    (error "Abort")))
+      (when (and (setq buf (reftex-get-buffer-visiting file))
+		 (save-excursion
+		   (set-buffer buf)
+		   buffer-read-only))
+	(ding)
+	(or (y-or-n-p (format "Buffer %s is read-only. Continue? "
+			      (buffer-name buf)))
+	    (error "Abort"))))))
 
 ;;; reftex-global.el ends here

File reftex-index.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-parse.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.
     (save-excursion
       (goto-char (point-min))
       (if (re-search-forward
-	   "\\(\\`\\|[\n\r]\\)[ \t]*\\\\bibliography{[ \t]*\\([^}]+\\)" nil t)
+	   "\\(\\`\\|[\n\r]\\)[ \t]*\\\\\\(no\\)?bibliography{[ \t]*\\([^}]+\\)" nil t)
 	  (setq files 
-		(split-string (reftex-match-string 2)
+		(split-string (reftex-match-string 3)
 			      "[ \t\n\r]*,[ \t\n\r]*")))))
   (when files
     (setq files 

File reftex-ref.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-sel.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-toc.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-vars.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.11
+;; Version: 4.14
 ;;
 
 ;; This file is part of GNU Emacs.
       (?a    . "\\citeauthor{%l}")
       (?A    . "\\citeauthor*{%l}")
       (?y    . "\\citeyear{%l}")))
+    (bibentry "The Bibentry package"
+      "\\bibentry{%l}")
     (harvard "The Harvard package"
      ((?\C-m . "\\cite{%l}")
       (?p    . "\\cite{%l}")
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version:    4.11
+;; Version:    4.14
 ;; Keywords:   tex
 
 ;; This file is part of GNU Emacs.
 ;;; Define the formal stuff for a minor mode named RefTeX.
 ;;;
 
-(defconst reftex-version "RefTeX version 4.11"
+(defconst reftex-version "RefTeX version 4.14"
   "Version string for RefTeX.")
 
 (defvar reftex-mode nil
 (defvar reftex-everything-regexp-no-index nil)
 (defvar reftex-index-re nil)
 (defvar reftex-find-citation-regexp-format
-  "\\\\[a-zA-Z]*cite[*a-zA-Z]*\\*?\\(\\[[^]]*\\]\\|{[^}]*}\\)*{\\([^}]*,\\)?\\(%s\\)[},]")
+  "\\\\\\([a-zA-Z]*cite[*a-zA-Z]*\\*?\\|bibentry\\)\\(\\[[^]]*\\]\\|{[^}]*}\\)*{\\([^}]*,\\)?\\(%s\\)[},]")
 (defvar reftex-find-reference-format
   "\\\\\\(ref[a-zA-Z]*\\|[a-zA-Z]*ref\\(range\\)?\\)\\*?\\(\\[[^]]*\\]\\|{[^}]*}\\)*{\\(%s\\)}")
 (defvar reftex-macros-with-labels nil)
 	    (concat wbol "\\\\\\("
 		    (mapconcat (lambda (x) (regexp-quote (car x)))
 			       reftex-section-levels-all "\\|")
-		    "\\)\\*?\\(\\[[^]]*\\]\\)?{?"))
+		    "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n]"))
 	   (appendix-re (concat wbol "\\(\\\\appendix\\)"))
 	   (macro-re
 	    (if macros-with-labels
 ;;;
 ;;; BibTeX citations.
 
+(autoload 'reftex-citep "reftex-cite")
+(autoload 'reftex-citet "reftex-cite")
 (autoload 'reftex-make-cite-echo-string "reftex-cite")
 (autoload 'reftex-get-bibfile-list "reftex-cite")
 (autoload 'reftex-pop-to-bibtex-entry "reftex-cite")
 @synindex ky cp
 @syncodeindex vr cp
 @syncodeindex fn cp
-@set VERSION 4.11
-@set EDITION 4.11
-@set DATE February 2000
+@set VERSION 4.12
+@set EDITION 4.12
+@set DATE March 2000
 @set AUTHOR Carsten Dominik
-@set AUTHOR-EMAIL dominik@@strw.leidenuniv.nl
+@set AUTHOR-EMAIL dominik@@astro.uva.nl
 @set MAINTAINER Carsten Dominik
-@set MAINTAINER-EMAIL dominik@@strw.leidenuniv.nl
+@set MAINTAINER-EMAIL dominik@@astro.uva.nl
 @c %**end of header
 @finalout
 
 @end titlepage
 @page
 
-@ifinfo
+@ifnottex
 @node Top,,,(dir)
 
 @b{Ref@TeX{}} is a package for managing Labels, References,
 @end detailmenu
 @end menu
 
-@end ifinfo
+@end ifnottex
 
 @node Introduction, Table of Contents, , Top
 @chapter Introduction
 @item
 @vindex tex-main-file
 @vindex TeX-master
-All files belonging to a multifile document should have a File Variable
-(@code{TeX-master} for AUCTeX or @code{tex-main-file} for the
-standard Emacs LaTeX mode) set to the name of the master file.  See the
-documentation of your (La)TeX mode and @ref{File Variables,,,emacs, The
-GNU Emacs Manual}.@refill
+All files belonging to a multifile document should define a File
+Variable (@code{TeX-master} for AUCTeX or @code{tex-main-file} for the
+standard Emacs LaTeX mode) containing the name of the master file.  For
+example, to set the file variable @code{TeX-master}, include something
+like the following at the end of each TeX file:@refill
+
+@example
+%%% Local Variables: ***
+%%% mode:latex ***
+%%% TeX-master: "thesis.tex"  ***
+%%% End: ***
+@end example
+
+AUCTeX with the setting
+
+@lisp
+(setq-default TeX-master nil)
+@end lisp
+
+will actually ask you for each new file about the master file and insert
+this comment automatically.  For more details see the documentation of
+the AUCTeX (@pxref{Multifile,,,auctex, The AUC TeX User Manual}), the
+documentation about the Emacs (La)TeX mode (@pxref{TeX Print,,,emacs,
+The GNU Emacs Manual}) and the Emacs documentation on File Variables
+(@pxref{File Variables,,,emacs, The GNU Emacs Manual}).@refill
 
 @item
 The context of a label definition must be found in the same file as the
 @cindex Emacs packages, @code{AUCTeX}
 
 AUCTeX is without doubt the best major mode for editing TeX and LaTeX
-files with Emacs.  If AUCTeX is not part of you Emacs distribution, you
-can get it@footnote{XEmacs 21.x users may
-want to install the corresponding XEmacs package.} by ftp from the
+files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}).
+If AUCTeX is not part of you Emacs distribution, you can get
+it@footnote{XEmacs 21.x users may want to install the corresponding
+XEmacs package.} by ftp from the
 @uref{http://www.sunsite.auc.dk/auctex/,AUCTeX distribution site}.
 
 @menu
 @findex TeX-add-style-hook, @r{AUCTeX}
 Style files are Emacs Lisp files which are evaluated by AUCTeX in
 association with the @code{\documentclass} and @code{\usepackage}
-commands of a document. Support for @b{Ref@TeX{}} in such a style file
-is useful when the LaTeX style defines macros or environments connected
-with labels, citations, or the index.  Many style files
-(e.g. @file{amsmath.el} or @file{natbib.el}) distributed with AUCTeX
-already support @b{Ref@TeX{}} in this way.@refill
+commands of a document (@pxref{Style Files,,,auctex}). Support for
+@b{Ref@TeX{}} in such a style file is useful when the LaTeX style
+defines macros or environments connected with labels, citations, or the
+index.  Many style files (e.g. @file{amsmath.el} or @file{natbib.el})
+distributed with AUCTeX already support @b{Ref@TeX{}} in this
+way.@refill
 
 Before calling a @b{Ref@TeX{}} function, the style hook should always
 test for the availability of the function, so that the style file will
 @item
 Fixed bug which would parse @samp{\Section} just like @samp{\section}.
 @end itemize
+@noindent @b{Version 4.12}
+@itemize @bullet
+@item
+Support for @file{bibentry} citation style.
+@end itemize
 
 @node Index,  , , Top
 @unnumbered Index