+1999-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * textmodes/bibtex.el (bibtex-hs-forward-sexp): Added to support
+ using the hideshow package.
+ (hs-special-modes-alist): Added entry for bibtex to allow the use
+ of the hideshow package.
+ (bibtex-hide-entry-bodies): Deleted as hiding of entry bodies is
+ not longer provided by bibtex.el directly. Instead the hideshow
+ package should be used.
+ (bibtex-mode-map, bibtex-edit-menu, bibtex-mode): Delete
+ references to bibtex-hide-entry-bodies.
+
+1999-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * textmodes/bibtex.el: Copyright notice is up to date. Moved
+ maintainer information closer to the beginning of the bibtex.el
+ file.
+ (bibtex-maintainer-salutation): New constant.
+ (bibtex-version): New constant.
+ (bibtex-submit-bug-report): Use bibtex-version and
+ bibtex-maintainer-salutation.
+ (bibtex-entry-field-alist): Made booktitle field optional for
+ @inproceedings entries when crossreferenced.
+ (bibtex-entry-field-alist): Added booktitle field to proceedings
+ entry type (for cross referencing). Thanks to Wagner Toledo Correa
+ for the suggestion.
+ (bibtex-string-file-path): Fixed typo.
+
+1999-12-05 Carsten Dominik <dominik@strw.leidenuniv.nl>
+
+ * textmodes/bibtex.el (bibtex-mode-map): Reserved the key `C-c &'
+ for reftex.el.
+ (bibtex-edit-menu): Added `reftex-view-crossref-from-bibtex'
+ to menu.
+
1999-12-04 Dave Love <fx@gnu.org>
* delsel.el: Revert previous change -- region is significant to
;;; bibtex.el --- BibTeX mode for GNU Emacs
-;; Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
;; Author: Stefan Schoef <schoef@offis.uni-oldenburg.de>
;; Bengt Martensson <bengt@mathematik.uni-Bremen.de>
(eval-when-compile
(require 'compile))
+\f
+;; Bug Reporting
+
+(defconst
+ bibtex-maintainer-address "Dirk Herrmann <D.Herrmann@tu-bs.de>")
+;; current maintainer
+
+(defconst
+ bibtex-maintainer-salutation "Hallo Dirk,")
+;; current maintainer
+
+(defconst
+ bibtex-version "(emacs 20.4)")
+;; current version of the bibtex.el file
+
+\f
;; User Options:
(defgroup bibtex nil
("publisher" "Publishing company, its location")
("note" "Remarks to be put at the end of the \\bibitem")))
((("author" "Author1 [and Author2 ...] [and others]")
- ("title" "Title of the article in proceedings (BibTeX converts it to lowercase)")
- ("booktitle" "Name of the conference proceedings"))
- (("pages" "Pages in the conference proceedings")
+ ("title" "Title of the article in proceedings (BibTeX converts it to lowercase)"))
+ (("booktitle" "Name of the conference proceedings")
+ ("pages" "Pages in the conference proceedings")
("year" "Year of publication")
("editor" "Editor1 [and Editor2 ...] [and others]")
("volume" "Volume of the conference proceedings in the series")
("note" "Remarks to be put at the end of the \\bibitem")))))
("Proceedings" . (((("title" "Title of the conference proceedings")
("year" "Year of publication"))
- (("editor" "Editor1 [and Editor2 ...] [and others]")
+ (("booktitle" "Title of the proceedings for cross references")
+ ("editor" "Editor1 [and Editor2 ...] [and others]")
("volume" "Volume of the conference proceedings in the series")
("number" "Number of the conference proceedings in a small series (overwritten by volume)")
("series" "Series in which the conference proceedings appeared")
:type '(repeat file))
(defvar bibtex-string-file-path (getenv "BIBINPUTS")
- "*Colon separated list of pathes to search for `bibtex-string-files'.")
+ "*Colon separated list of paths to search for `bibtex-string-files'.")
(defcustom bibtex-help-message t
"*If not nil print help messages in the echo area on entering a new field."
(defun bibtex-run-with-idle-timer (secs repeat function &rest args)
(start-itimer "bibtex" function secs (if repeat secs nil) t)))
+\f
+;; Support for hideshow minor mode
+(defun bibtex-hs-forward-sexp (arg)
+ "Replacement for `forward-sexp' to be used by `hs-minor-mode'."
+ (if (< arg 0)
+ (backward-sexp 1)
+ (if (looking-at "@\\S(*\\s(")
+ (progn
+ (goto-char (match-end 0))
+ (forward-char -1)
+ (forward-sexp 1))
+ (forward-sexp 1))))
+
+(add-to-list
+ 'hs-special-modes-alist
+ '(bibtex-mode "@\\S(*\\s(" "\\s)" nil bibtex-hs-forward-sexp nil))
+
\f
;; Syntax Table, Keybindings and BibTeX Entry List
(defvar bibtex-mode-syntax-table
(defvar bibtex-mode-map
(let ((km (make-sparse-keymap)))
+ ;; The Key `C-c&' is reserved for reftex.el
(define-key km "\t" 'bibtex-find-text)
(define-key km "\n" 'bibtex-next-field)
(define-key km "\M-\t" 'bibtex-complete-string)
(define-key km "\C-\M-l" 'bibtex-reposition-window)
(define-key km "\C-\M-h" 'bibtex-mark-entry)
(define-key km "\C-c\C-b" 'bibtex-entry)
- (define-key km "\C-c\C-t" 'bibtex-hide-entry-bodies)
(define-key km "\C-c\C-rn" 'bibtex-narrow-to-entry)
(define-key km "\C-c\C-rw" 'widen)
(define-key km "\C-c\C-o" 'bibtex-remove-OPT-or-ALT)
"--"
["Ispell Entry" bibtex-ispell-entry t]
["Ispell Entry Abstract" bibtex-ispell-abstract t]
- ["Narrow to Entry" bibtex-narrow-to-entry t])
+ ["Narrow to Entry" bibtex-narrow-to-entry t]
+ "--"
+ ["View Cite Locations (RefTeX)" reftex-view-crossref-from-bibtex
+ (fboundp 'reftex-view-crossref-from-bibtex)])
("Operating on Current Field"
["Remove Delimiters" bibtex-remove-delimiters t]
["Remove OPT or ALT Prefix" bibtex-remove-OPT-or-ALT t]
["Validate Entries" bibtex-validate t]
["Sort Entries" bibtex-sort-buffer t]
["Reformat Entries" bibtex-reformat t]
- ["Hide Entry Bodies" bibtex-hide-entry-bodies t]
["Count Entries" bibtex-count-entries t])
("Miscellaneous"
["Convert Alien Buffer" bibtex-convert-alien t]
["String" bibtex-String t]
["Preamble" bibtex-Preamble t]))
-\f
-;; Bug Reporting
-
-(defconst
- bibtex-maintainer-address "Dirk Herrmann <D.Herrmann@tu-bs.de>")
-;; current maintainer
-
\f
;; Internal Variables
;; Regexp defining the type part of a BibTeX reference entry (almost
;; the same as bibtex-field-name)
-(defconst bibtex-reference-key "[][a-z0-9.:;?!`'/*@+=|()<>&_^$-]+")
+(defconst bibtex-reference-key "[][a-zA-Z0-9.:;?!`'/*@+=|()<>&_^$-]+")
;; Regexp defining the label part of a BibTeX reference entry
(defconst bibtex-field-name "[^\"#%'(),={} \t\n0-9][^\"#%'(),={} \t\n]*")
(defun bibtex-move-outside-of-entry ()
;; Make sure we are outside of a BibTeX entry.
(let ((orig-point (point)))
- (bibtex-end-of-entry)
+ (bibtex-end-of-entry)
(if (< (point) orig-point)
;; We moved backward, so we weren't inside an entry to begin with.
;; Leave point at the beginning of a line, and preferably
titleword
bibtex-autokey-titleword-ignore)
(setq counter (1- counter))
- (setq
+ (setq
titleword
(funcall bibtex-autokey-titleword-case-convert titleword))
(if (or (not (numberp bibtex-autokey-titlewords))
bibtex-ispell-abstract
bibtex-ispell-entry
bibtex-narrow-to-entry
- bibtex-hide-entry-bodies
bibtex-sort-buffer
bibtex-validate
bibtex-count
(let ((reporter-prompt-for-summary-p t))
(reporter-submit-bug-report
bibtex-maintainer-address
- (concat "bibtex.el " "(emacs 19.35)")
+ (concat "bibtex.el " bibtex-version)
(list
'system-configuration
'system-configuration-options
;; user variables which shouldn't cause any errors
)
nil nil
- (concat "To the bibtex.el maintainer:
+ (concat bibtex-maintainer-salutation "
-I want to report a bug on Emacs BibTeX mode.
+I want to report a bug on Emacs BibTeX mode " bibtex-version ".
I've read the `Bugs' section in the `Emacs' info page, so I know how
to make a clear and unambiguous report. I have started a fresh Emacs
via `"invocation-name " --no-init-file --no-site-file', thereafter (in
(narrow-to-region
(bibtex-beginning-of-entry) (bibtex-end-of-entry))))
-(defun bibtex-hide-entry-bodies (&optional arg)
- "Hide all lines between first and last BibTeX entries not beginning with @.
-With prefix argument ARG, show all text."
- (interactive "P")
- (save-excursion
- (let ((buffer-read-only nil))
- (if arg
- (subst-char-in-region (point-min) (point-max) ?\r ?\n t)
- (let ((pos (point-max)))
- (goto-char (point-max))
- (while (re-search-backward "^@" nil t)
- (subst-char-in-region (point) pos ?\n ?\r t)
- (if (not (bobp)) (forward-char -1))
- (setq pos (point)))))
- (setq selective-display (not arg)))))
-
(defun bibtex-sort-buffer ()
"Sort BibTeX buffer alphabetically by key.
Text outside of BibTeX entries is not affected. If